28-09-12, 11:27 PM
بسم الله الرحمن الرحيم
1- الاستعانة بمكتبة برمجية :
VB.NET
C#
C++
Java
2- طرق تعريف المتغيرات :
VB.NET
C#
C++
Java
3- المتغيرات النصية :
VB.NET
C#
C++
Java
4- تقسيم النصوص :
VB.NET
C#
[COLOR="#008000"]C++
[/COLOR]
Java
5- دمج النصوص :
VB.NET
C#
C++
Java
6- التحويل من والي متغير نصي :
VB.NET
C#
C++
Java
7- التحويل من متغير الي آخر :
VB.NET
C#
C++
Java
8- بناء متغير نصي :
VB.NET
C#
C++
Java
9- التحويل من متغير الي آخر :
VB.NET
C#
C++
Java
10- لأضافة تاريخ معين :
VB.NET
C#
C++
Java
11- التحويل من متغير أصغر الي صحيح :
VB.NET
C#
C++
Java
12- تحويل المتغيرات :
VB.NET
C#
[COLOR="#008000"]C++
[/COLOR]
Java
13- جمل الشرط :
VB.NET
C#
C++
Java
14- جمل الشرط :
VB.NET
C#
C++
Java
15- دمج الشروط :
VB.NET
C#
[COLOR="#008000"]C++
[/COLOR]
[COLOR="#FFA07A"]Java
[/COLOR]
16- التحقق من شرط واحد علي الأقل للتنفيذ :
VB.NET
C#
[COLOR="#008000"]C++
[/COLOR]
Java
17- التحقق من أكثر من شرط في وقت واحد :
VB.NET
C#
C++
Java
18- حالات التعدد الشرطية :
[COLOR="#0000FF"]VB.NET
[/COLOR]
C#
[COLOR="#008000"]C++
[/COLOR]
Java
19- For الحلقة التكرارية :
VB.NET
C#
[COLOR="#008000"]C++
[/COLOR]
Java
20- باستخدام القفزات For الحلقة التكرارية :
VB.NET
C#
[COLOR="#008000"]C++
[/COLOR]
[COLOR="#FFA07A"]Java
[/COLOR]
21- باستخدام القفزات While الحلقة التكرارية :
VB.NET
[COLOR="#00FF00"]C#
[/COLOR]
C++
Java
22- Do While الحلقة التكرارية :
VB.NET
C#
[COLOR="#008000"]C++
[/COLOR]
Java
: For Each الحلقة التكرارية23 -
[COLOR="#0000FF"]VB.NET
[/COLOR]
C#
C++
Java
24- Try Method أسلوب أقتناص الأخطاء :
VB.NET
C#
C++
Java
25- Hello World طباعة جملة :
VB.NET
C#
C++
Java
26- أسلوب كتابة الدوال :
VB.NET
C#
[COLOR="#008000"]C++
[/COLOR]
Java
27- أسلوب أستدعاء الدوال :
VB.NET
C#
C++
Java
28- Methods أسلوب كتابة الطرق :
VB.NET
C#
[COLOR="#008000"]C++
[/COLOR]
[COLOR="#FFA07A"]Java
[/COLOR]
29- Out الوظيفة :
VB.NET
C#
C++
Java
30- byref الارسال بالمرجع :
VB.NET
C#
C++
Java
31- تعريف أبسط المصفوفات :
VB.NET
C#
C++
Java
32- تعريف أبسط المصفوفات :
VB.NET
C#
C++
Java
33- المصفوفات متعددة الابعاد :
VB.NET
C#
C++
Java
34- Structures التراكيب :
VB.NET
C#
C++
Java
35- Struct أنشاء الدوال داخل ال :
VB.NET
C#
C++
Java
36- أسلوب التأشير :
VB.NET
C#
C++
Java
37- التعامل مع مربع النص :
VB.NET
C#
C++
Java
38- جعل مربع النص لا يقبل سوي أرقام :
VB.NET
[COLOR="#00FF00"]C#
[/COLOR]
C++
Java
39- تفريغ جميع حقول النص في آن واحد :
VB.NET
C#
C++
Java
40- تعريف أبسط الفئات :
VB.NET
C#
C++
Java
41- الفئات المعلنة :
VB.NET
C#
C++
Java
42- تعريف كائنات الفئة أو أعلان الكائن :
VB.NET
C#
C++
Java
43- تعريف المتغيرات السابقة من خلال مصفوفة :
VB.NET
C#
C++
Java
44- Constructors المشيدات :
VB.NET
C#
C++
Java
45- تهيئة المشيد في ابسط الحالات :
VB.NET
C#
C++
Java
46- التعامل مع المجلدات :
VB.NET
C#
C++
Java
المصدر الأساسي : http://arabcodelibrary.blogspot.com/2012..._6012.html
أرجوا منكم الدعاء لي ولوالداي وللمسلمين والمسلمات والمؤمنين والمؤمنات أجمعين والدعاء لأخواننا في سوريا وللكفار بالإسلام
1- الاستعانة بمكتبة برمجية :
VB.NET
كود :
Imports System.IO
C#
كود :
Using system.io;
C++
كود :
using namespace System::IO;
Java
كود :
import java. io.Writer;
2- طرق تعريف المتغيرات :
VB.NET
كود :
Dim x AS Integer
C#
كود :
Int x;
C++
كود :
Int x;
Java
كود :
Int x;
3- المتغيرات النصية :
VB.NET
كود :
Dim x AS string
C#
كود :
String x;
C++
كود :
String ^x;
Java
كود :
String x;
4- تقسيم النصوص :
VB.NET
كود :
Dim newarray As String() = g.Split("_")
C#
كود :
string[] newarray = g.Split("_");
[COLOR="#008000"]C++
[/COLOR]
كود :
array<String^> ^newarray = g->Split("_");
Java
كود :
String testString = "java_"; java.util.Arrays.toString(testString.split("_"));
5- دمج النصوص :
VB.NET
كود :
Dim s3 As String = [String].Concat(s1, s2)
C#
كود :
string s3 = String.Concat(s1, s2);
C++
كود :
String ^s3 = String::Concat(s1, s2);
Java
كود :
String s3 = s1.concat(s2);
6- التحويل من والي متغير نصي :
VB.NET
كود :
Dim x As Integer = Integer.Parse("1")
Dim v As Boolean = Boolean.Parse("True")
كود :
int x = int.Parse("1");
bool v = bool.Parse("True");
كود :
int x = int.Parse("1");
bool v = bool.Parse("True");
كود :
int x = Integer.parseInt("1");
boolean v = Boolean.parseBoolean("True");
VB.NET
كود :
Dim x As String = m.ToString()
C#
كود :
string x = m.ToString();
C++
كود :
String ^x = m->ToString();
Java
كود :
String x = m.toString();
8- بناء متغير نصي :
VB.NET
كود :
Label1.Text = label2.Text + ".com"
كود :
Label1.Text = label2.Text + ".com";
C++
كود :
label1->Text = label2->Text + ".com";
Java
كود :
jLabel1.setText(jLabel2.getText() + ".com");
9- التحويل من متغير الي آخر :
VB.NET
كود :
Dim wsite As New System.Text.StringBuilder(Text1.Text)
wsite.Append(".com")
C#
كود :
System.Text.StringBuilder wsite = New System.Text.StringBuilder(Text1.Text);
wsite.Append("@hotmail.com");
كود :
System::Text::StringBuilder ^wsite = gcnew System::Text::StringBuilder(label1->Text);
wsite->Append("@hotmail.com");
كود :
StringBuilder wsite = new StringBuilder(jLabel1.getText()); wsite.append("@hotmail.com");
VB.NET
كود :
Dim dt as DateTime = New DateTime(2012, 1, 1)
Label1.Text=dateTimePicker1.Value
Dim dt as DateTime = New DateTime.Now
C#
كود :
DateTime dt = new DateTime(2012, 1, 1);
Label1.Text=dateTimePicker1.Value;
DateTime dt = new DateTime(2012, 1, 1);
كود :
DateTime dt = DateTime(2012, 1, 1);
label1->Text = dateTimePicker1->Text;
Console::WriteLine(DateTime::Now);
كود :
java.util.Date dt = new java.util.Date(2012, 1, 1);
label1.setText(jCalendarCombo1.getDate().toLocaleString()); System.out.println(new java.util.Date(2012, 1, 1));
VB.NET
كود :
Private Function power(ByVal number As Integer) As Integer
Return number Xor 2
End Function
‘at any event put..
Dim x As Short = 5
power(x)
كود :
int power(int number)
{
return number^2;
}
//at any event put..
Short x=5;
power(x);
كود :
int power(int number)
{
return number^2;
}
//at any event put..
short x = 5;
power(x);
كود :
int power(int number)
{
return number^2;
}
//at any event put..
short x = 5;
power(x);
VB.NET
كود :
Dim myByte As Short , myInt As Integer
myByte = Convert.ToByte(myInt)
كود :
short myByte; int myInt;
myByte = Convert.ToByte(myInt);
[/COLOR]
كود :
short myByte; int myInt;
myByte = Convert::ToByte(myInt);
كود :
//There is no Convert To Method in java so you need to use different way …
short myByte = 5; int myInt = 1; long x = myByte + myInt;
System.out.println(x);
VB.NET
كود :
If x = 5 Then
Console.WriteLine("five")
Else
Console.WriteLine("notFive")
End If
كود :
if (x==5)
Console.WriteLine("five");
else
Console.WriteLine("notFive");
كود :
if (x == 5)
cout<<"five";
else
cout<<" notFive ";
كود :
if (x == 5)
System.out.print("five");
else
System.out.print(" notFive ");
VB.NET
كود :
If x > 90 Then
Console.WriteLine("ممتاز")
ElseIf x >= 50 Then
Console.WriteLine("ناجح")
Else
Console.WriteLine("راسب")
End If
C#
كود :
if (x > 90)
{
Console.WriteLine("ممتاز ");
}
else if (x >=50)
{
Console.WriteLine("ناجح ");
}
else
{
Console.WriteLine("راسب ");
}
كود :
if (x > 90)
{
Console::WriteLine("ممتاز ");
}
else if (x >= 50)
{
Console::WriteLine("ناجح ");
}
else
{
Console::WriteLine("راسب ");
}
كود :
if (x > 90)
{
System.out.println("ممتاز ");
}
else if (x >= 50)
{
System.out.println("ناجح ");
}
else
{
System.out.println("راسب ");
}
15- دمج الشروط :
VB.NET
كود :
If (x < 90 Or x > 50) And (Not name = "ahmed") Then End If
كود :
if ((x < 90 || x>50) && (!name="ahmed"));
[/COLOR]
كود :
if ((x < 90 || x>50) && (name != "ahmed"));
[/COLOR]
كود :
if ((x < 90 || x>50) && (name != "ahmed"));
16- التحقق من شرط واحد علي الأقل للتنفيذ :
VB.NET
كود :
If id > 0 And SearchForID>0 Then
' do something
End If
C#
كود :
if (id > 0 & SearchForID>0) {
// do something
}
[/COLOR]
كود :
if (id > 0 & SearchForID(id) > 0)
{
// do something
}
Java
كود :
if (id > 0 & SearchForID(id) > 0)
{
// do something
}
17- التحقق من أكثر من شرط في وقت واحد :
VB.NET
كود :
If id > 0 AndAlso SearchForID>0 Then
' do something
End If
C#
كود :
if (id > 0 && SearchForID>0) {
// do something
}
كود :
if)id > 0 && SearchForID(id) > 0(
{
// do something
}
كود :
if)id > 0 && SearchForID(id) > 0(
{
// do something
}
18- حالات التعدد الشرطية :
[COLOR="#0000FF"]VB.NET
[/COLOR]
كود :
Select Case )x(
Case 90
Console.WriteLine("ممتاز")
Case 50
Console.WriteLine("ناجح")
End Select
كود :
switch (x)
{
case 90:
Console.WriteLine("ممتاز ");
break;
case 50:
Console.WriteLine("ناجح ");
break;
}
[COLOR="#008000"]C++
[/COLOR]
كود :
switch (x)
{
case 90:
cout<<("ممتاز ");
break;
case 50:
cout<<("ناجح ");
break;
}
كود :
switch (x)
{
case 90:
System.out.println("ممتاز ");
break;
case 50:
System.out.println("ناجح ");
break;
}
19- For الحلقة التكرارية :
VB.NET
كود :
For i As Integer = 0 To 9
Console.WriteLine(i) Next
كود :
for (int i = 0; i < 10; i++)
{Console.WriteLine(i); }
[/COLOR]
كود :
for (int i = 0; i < 10; i++)
{cout<<I; }
Java
كود :
for (int i = 0; i < 10; i++)
{ System.out.print(I);}
VB.NET
كود :
For i As Integer = 0 To 9 Step 2
Console.WriteLine(i) Next
كود :
for (int i = 0; i < 10; i+=2)
{Console.WriteLine(i); }
[/COLOR]
كود :
for (int i = 0; i < 10; i+=2)
{cout<<I; }
[/COLOR]
كود :
for (int i = 0; i < 10; i+=2)
{System.out.printIn(i); }
VB.NET
كود :
Dim x As Integer = 0
While x < 10
Console.WriteLine(x)
x +=1
End While
[COLOR="#00FF00"]C#
[/COLOR]
كود :
int x = 0;
while (x < 10)
{
Console.WriteLine(x);
x++;
}
كود :
int x = 0;
while (x < 10)
{
Console.WriteLine(x);
x++;
}
كود :
int x = 0;
while (x < 10)
{
System.out.println(x);
x++;
}
22- Do While الحلقة التكرارية :
VB.NET
كود :
Dim s As String
Do
s = Console.ReadLine()
Console.WriteLine(inp)
Loop While s <> "exit"
كود :
string s;
do
{
s = Console.ReadLine();
Console.WriteLine(s);
}
while(s!="exit");
[/COLOR]
كود :
String ^s;
do
{
s = Console::ReadLine();
Console::WriteLine(s);
}
While (s != "exit");
كود :
String s;
do
{
try {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
s = in.readLine();
System.out.println(s);
} catch (IOException ex) {
Logger.getLogger(Form1.class.getName()).log(Level.SEVERE, null, ex);
}
while (s != "exit");
[COLOR="#0000FF"]VB.NET
[/COLOR]
كود :
Dim x As Integer() = {10, 20, 30, 40}
For Each i As Integer In x
Console.WriteLine(i)
Next
كود :
int[] x = { 10, 20, 30, 40 };
foreach (int i in x)
Console.WriteLine(i);
كود :
Array<int> ^x = { 10, 20, 30, 40 };
for each (int i in x)
Cout<<i;
كود :
//هذا النوع من الحلقات غير متوافر
int[] x = {01,20,30,40};
for (int i = 0; i < x.length; i++) {
System.out.println(i);
}
VB.NET
كود :
try
'code
Catch ex As Exception
End try
كود :
try
{
//code
}
catch (Exception ex)
{
}
كود :
try
{
//code
}
catch (Exception ^ex)
{
}
كود :
try
{
//code
}
catch (RuntimeException ex)
{
}
VB.NET
كود :
Module Module1
Sub Main()
Console.Write("Hello World")
Console.ReadKey()
End Sub
End Module
كود :
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication4
{
class Program
{
static void Main(string[] args)
{
Console.Write("Hello World");
Console.ReadKey();
}
}
}
C++
كود :
//.h file code:
using namespace System;
using namespace System::Collections::Generic;
using namespace System::Text;
namespace ConsoleApplication4
{
private ref class Program
{
static void Main(array<String^> ^args);
};
}
//.cpp file code:
using namespace System;
using namespace System::Collections::Generic;
using namespace System::Text;
namespace ConsoleApplication4
{
void Program::Main(array<String^> ^args)
{
Console::Write("Hello World");
Console::ReadKey();
}
}
كود :
package ConsoleApplication1;
import System.*;
import System.Collections.Generic.*;
import System.Text.*;
//h file code:
public class Program
{
private static void Main(String[] args)
{
System.out.print")Hello World("
}
}
//cpp file code:
VB.NET
كود :
Private Function sum(ByVal number1 As Integer, ByVal number2 As Integer) As
Integer
Dim total As Integer = number1 + number2
Return total
End Function
كود :
static int sum(int number1, int number2)
{
int total = number1 + number2;
return total;
}
[/COLOR]
كود :
static int sum(int number1, int number2)
{
int total = number1 + number2;
return total;
}
كود :
private static int sum(int number1, int number2)
{
int total = number1 + number2;
return total;
}
VB.NET
كود :
Dim result As Integer = sum(5, 8)
Console.Write(result)
Console.ReadKey()
كود :
int result = sum(5, 8);
Console.Write(result);
Console.ReadKey();
كود :
int result = sum(5, 8);
cout<<result;
كود :
int result = sum(5, 8);
System.out.print(result);
VB.NET
كود :
Private Sub printmsg(ByVal msg As String)
Console.WriteLine(msg)
End Sub
كود :
void printmsg(string msg)
{
Console.WriteLine(msg);
}
[COLOR="#008000"]C++
[/COLOR]
كود :
void printmsg(string msg)
{
Cout<<msg;
}
[/COLOR]
كود :
private void printmsg(string msg)
{
System.out.printIn(msg);
}
29- Out الوظيفة :
VB.NET
كود :
Private Shared Sub sum(ByVal number1 As Integer, ByVal number2 As Integer, ByRef
total As Integer)
total = number1 + number2
End Sub
'usage
Dim result As Integer
sum(5, 8, result)
كود :
static void sum(int number1, int number2, out int total)
{
total = number1 + number2;
}
//usage
sum(5, 8,out result);
كود :
static void sum(int number1, int number2, [System::Runtime::InteropServices::Out] int %total)
{
total = number1 + number2;
}
//usage
sum(5, 8,out result);
كود :
private static void sum(int number1, int number2,int total)
{
total = number1 + number2;
}
//usage
sum(5, 8,int result);
30- byref الارسال بالمرجع :
VB.NET
كود :
Private Sub [sub](ByRef number1 As Integer, ByRef number2 As Integer) _
Dim result As Integer = number1 - number2 _
Return result
End Sub
كود :
static void sub(ref int number1, ref int number2)
{
int result = number1 - number2;
return result;_
}_
كود :
private :Void sub(int %number1, int %number2)
{
int result = number1 - number2;
//return result; in c++ void function can not return values
}
كود :
private int sub(tangible.RefObject<Integer> number1, tangible.RefObject<Integer> number2)
{
int result = number1.argvalue - number2.argvalue;
return result;
}
//with using a package…
package tangible;
public class RefObject<T> {
public T argvalue;
public RefObject(T refarg)
{
argvalue = refarg;
}
}
VB.NET
كود :
Dim intarray As Integer() = New Integer(4)
C#
كود :
int [] intarray = new int[5];
كود :
array<int> ^intarray = gcnew array<int>(5);
كود :
int[] intarray = new int[5];
VB.NET
كود :
Dim intarray As Integer() = New Integer() {15, 20, 13}
كود :
int[] intarray = new int[] { 15, 20, 13 };
كود :
array<int> ^intarray = gcnew array<int> {15, 20, 13};
كود :
int[] intarray = new int[] {15, 20, 13};
VB.NET
كود :
Dim matrix As Integer = New Integer(2, 2)
‘To use it..
matrix(1, 2) = 20
كود :
int matrix = new int[2,2];
//To use it..
matrix[1,2]=20;
كود :
int matrix = gcnew array<int, 2>(2,2);
//To use it..
matrix[1,2] = 20;
كود :
int[][] matrix = new int[2][2];
//To use it..
matrix[1][2] = 20;
VB.NET
كود :
Structure Car
Public carNumber As Integer
Public year As Integer
Public factory As String
End Structure_
‘usage..
Dim ahmedcar As New Car()
ahmedcar.carNumber = 1000
ahmedcar.factory = "Nissan"
ahmedcar.year = 2007
كود :
struct Car
{
public int carNumber;
public int year;
public string factory;
};
//usage..
Car ahmedcar = new Car();
ahmedcar.carNumber = 1000;
ahmedcar.factory = "Nissan";
ahmedcar.year = 2007;
كود :
struct Car
{
public int carNumber;
public int year;
public string factory;
};
//usage..
Car ahmedcar = new Car();
ahmedcar.carNumber = 1000;
ahmedcar.factory = "Nissan";
ahmedcar.year = 2007;
كود :
public class Car
{
public int carNumber = new public();
public int year = new public();
public String factory = new public();
}
//usage..
Car ahmedcar = new Car();
ahmedcar.carNumber = 1000;
ahmedcar.factory = "Nissan";
ahmedcar.year = 2007;
VB.NET
كود :
Structure License
Public UserName As String
Public yearsToFinish As Integer _
Public Sub renew(ByVal periode As Integer)
yearsToFinish += periode
End Sub
End Structure
كود :
struct License
{
public string UserName;
public int yearsToFinish;
public void renew(int periode)
{
yearsToFinish += periode;
}
}
C++
كود :
struct License
{
public string UserName;
public int yearsToFinish;
public void renew(int periode)
{
yearsToFinish += periode;
}
}
كود :
public class Car
{
public int carNumber = new public();
public int year = new public();
public void renew(int periode)
{
yearsToFinish += periode;
}
}
36- أسلوب التأشير :
VB.NET
كود :
me
EX:
me.text = “Form”
C#
كود :
this
EX:
this.text=”From”;
كود :
this
EX:
this->Text= “Form”
كود :
this
EX:
this.setTitle("Form");
VB.NET
كود :
TextBox1.Text = “Friendassist”
C#
كود :
textBox1.Text = “Friendassist”;
C++
كود :
textBox1->Text = “Friendassist”;
كود :
jTextField1.setText("Friendassist");
VB.NET
كود :
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If (e.KeyChar < "0"c Or e.KeyChar > "9"c) Then
e.Handled = True
End If
End Sub
[/COLOR]
كود :
private void TextBox1_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e) {
if ((e.KeyChar < '0' | e.KeyChar > '9')) {
e.Handled = true;
}}
C++
كود :
private: System::Void textBox1_KeyPress(System::Object^ sender, System::Windows::Forms::KeyPressEventArgs^ e) {
if ((e->KeyChar < '0' | e->KeyChar > '9')) {
e->Handled = true;
}}
كود :
private void jTextField1KeyReleased(java.awt.event.KeyEvent evt) {
String text = jTextField1.getText();
if(text.length()>=0&&!text.contains("0")&&
!text.contains("1")&&
!text.contains("2")&&
!text.contains("3")&&
!text.contains("4")&&
!text.contains("5")&&
!text.contains("6")&&
!text.contains("7")&&
!text.contains("8")&&
!text.contains("9")) {
jTextField1.setText("");
} else {
}
}
VB.NET
كود :
Public Sub ClearTextBox(ByVal Root As Control)
For Each Ct As Control In Root.Controls
If TypeOf Ct Is TextBox Then
CType(Ct, TextBox).Clear()
End If
Next
End Sub
‘Usage ..
ClearTextBox(Me)
كود :
private void ClearAllTextBox(Control m){
foreach (Control cc in m.Controls){
if (cc.GetType() ==typeof ( TextBox))
((TextBox)cc).Clear();}
}
//usage..
ClearAllTextBox(this);
كود :
void ClearAllTextBox(TComponent *m){
for (int i = 0; i < m->ComponentCount; i++)
if (m->Components[i]->ClassName()==L"TEdit")
static_cast<TEdit* >(m->Components[i])->Clear();
}
//usage..
ClearAllTextBox(this);
كود :
public void ClearAllTextBox(FrameView m){
for(int i=0;i<m.getComponent().getComponentCount();i++){
if (m.getComponent().getComponent(i).getClass().toString().equals
("class javax.swing.JTextField"))
((javax.swing.JTextField)m.getComponent().getComponent(i)).setText(null);
}
//usage..
ClearAllTextBox(this);
VB.NET
كود :
Namespace ConsoleApplication1
Class Person
‘Functions and Main function of code ….
End Class
End Namespace
كود :
namespace ConsoleApplication1
{
class Person
{
// Functions and Main function of code ….
}
}
C++
كود :
namespace ConsoleApplication1
{
private ref class Person
{
// Functions and Main function of code ….
};
}
//.cpp file code:
namespace ConsoleApplication1
{
}
كود :
package ConsoleApplication1;
public class Person
{
// Functions and Main function of code ….
}
VB.NET
كود :
Class Person
Public FirstName As String
Public Last-Named As String
Public Age As Integer
End Class
كود :
class Person
{
public string FirstName;
public string LastName;
public int Age;
}
كود :
using namespace System;
private ref class Person
{
public:
String ^FirstName;
String ^LastName;
int Age;
};
Java
كود :
import System.*;
public class Person
{
public String FirstName;
public String LastName;
public int Age;
}
VB.NET
كود :
Dim boy As New Person()
boy.Age = 15
boy.FirstName = "Ahmed"
boy.LastName = "Gamal"
Dim girl As New Person()
girl.Age = 15
girl.FirstName = "Ahmed"
girl.LastName = "nahed"
كود :
Person boy = new Person();
boy.Age = 15;
boy.FirstName = "Ahmed";
boy.LastName = "Gamal";
Person girl = new Person();
girl.Age = 15;
girl.FirstName = "Ahmed";
girl.LastName = "nahed";
كود :
Person ^boy = gcnew Person();
boy->Age = 15;
boy->FirstName = "Ahmed";
boy->LastName = "Gamal";
Person ^girl = gcnew Person();
girl->Age = 15;
girl->FirstName = "Ahmed";
girl->LastName = "nahed";
كود :
Person boy = new Person();
boy.Age = 15;
boy.FirstName = "Ahmed";
boy.LastName = "Gamal";
Person girl = new Person();
girl.Age = 15;
girl.FirstName = "Ahmed";
girl.LastName = "nahed";
VB.NET
كود :
Dim MyEmpolyee As Person() = New Person(2) {}
MyEmpolyee(0) = New Person()
MyEmpolyee(0).FirstName = "Ahmed"
MyEmpolyee(0).LastName = "Gamal"
MyEmpolyee(0).Age = 15
كود :
Person [] MyEmpolyee = new Person[3];
MyEmpolyee[0] = new Person();
MyEmpolyee[0].FirstName = "Ahmed";
MyEmpolyee[0].LastName = "Gamal";
MyEmpolyee[0].Age = 15;
كود :
array<Person^> ^MyEmpolyee = gcnew array<Person^>(3);
MyEmpolyee[0] = gcnew Person();
MyEmpolyee[0]->FirstName = "Ahmed";
MyEmpolyee[0]->LastName = "Gamal";
MyEmpolyee[0]->Age = 15;
كود :
Person[] MyEmpolyee = new Person[3];
MyEmpolyee[0] = new Person();
MyEmpolyee[0].FirstName = "Ahmed";
MyEmpolyee[0].LastName = "Gamal";
MyEmpolyee[0].Age = 15;
VB.NET
كود :
Public Sub New(ByVal userfirstname As String)
FirstName = userfirstname
End Sub
كود :
public Person(string userfirstname)
{
FirstName = userfirstname;
}
كود :
public:
Person(String ^userfirstname);
<missing_class_definition>::Person(String ^userfirstname)
{
FirstName = userfirstname;
}
Java
كود :
Person(String ^userfirstname);
public final <missing_class_definition>.Person(String userfirstname)
{
FirstName = userfirstname;
}
VB.NET
كود :
Public Sub New()
Console.WriteLine("new object")
End Sub
كود :
public Person()
{
Console.WriteLine("new object");
}
كود :
public:
Person();
private:
<missing_class_definition>::Person()
{
Console::WriteLine("new object");
}
كود :
Person();
public <missing_class_definition>.Person()
{
System.out.println("new object");
}
46- التعامل مع المجلدات :
VB.NET
كود :
'Delete Folder
System.IO.Directory.Delete("Folder_path")
'Create new Folder
System.IO.Directory.CreateDirectory ("Folder_path")
'Move folder to new location
System.IO.Directory.Move("Folder_old_path", "Folder_neh")
كود :
//Delete Folder
System.IO.Directory.Delete("Folder_path");
//Create new Folder
System.IO.Directory.CreateDirectory ("Folder_path");
//Move folder to new location
System.IO.Directory.Move("Folder_old_path", "Folder_neh");
كود :
//Delete Folder
System::IO::Directory::Delete("Folder_path");
//Create new Folder
System::IO::Directory::CreateDirectory("Folder_path");
//Move folder to new location
System::IO::Directory::Move("Folder_old_path", "Folder_neh");
كود :
//Delete Folder
(new java.io.File("New folder")).delete();
//Create new Folder
(new java.io.File("New folder")).mkdir();
//Move folder to new location
// File (or directory) to be moved
File file = new File("filename");
// Destination directory
File dir = new File("directoryname");
// Move file to new directory
boolean success = file.renameTo(new File(dir, file.getName()));
المصدر الأساسي : http://arabcodelibrary.blogspot.com/2012..._6012.html
أرجوا منكم الدعاء لي ولوالداي وللمسلمين والمسلمات والمؤمنين والمؤمنات أجمعين والدعاء لأخواننا في سوريا وللكفار بالإسلام
رابط قناتي على اليوتيوب :
https://www.youtube.com/user/OsamaAhmadGalal
رابط حساب الفيسبوك :
https://www.facebook.com/P.Osama.Ahmad.Galal
رابط حساب التويتر :
https://twitter.com/osamaahmadgalal
البريد الإلكتروني للتواصل :
OsamaAhmadGalal@Hotmail.Com
OsamaAhmadGalal@Yahoo.Com
OsamaAhmadGalal@Gmail.Com
رقم الموبايل :
00201122777845
https://www.youtube.com/user/OsamaAhmadGalal
رابط حساب الفيسبوك :
https://www.facebook.com/P.Osama.Ahmad.Galal
رابط حساب التويتر :
https://twitter.com/osamaahmadgalal
البريد الإلكتروني للتواصل :
OsamaAhmadGalal@Hotmail.Com
OsamaAhmadGalal@Yahoo.Com
OsamaAhmadGalal@Gmail.Com
رقم الموبايل :
00201122777845