تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
أكبر مكتبة أكواد (java - c++ - c# - vb.net )
#1
بسم الله الرحمن الرحيم

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")
C#

كود :
int x = int.Parse("1");
bool v = bool.Parse("True");
C++

كود :
int x = int.Parse("1");
bool v = bool.Parse("True");
Java

كود :
int x = Integer.parseInt("1");
boolean v = Boolean.parseBoolean("True");
7- التحويل من متغير الي آخر :

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"
C#

كود :
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");
C++

كود :
System::Text::StringBuilder ^wsite = gcnew  System::Text::StringBuilder(label1->Text);
wsite->Append("@hotmail.com");
Java

كود :
StringBuilder wsite = new StringBuilder(jLabel1.getText()); wsite.append("@hotmail.com");
10- لأضافة تاريخ معين :

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);
C++

كود :
DateTime dt = DateTime(2012, 1, 1);
label1->Text = dateTimePicker1->Text;
Console::WriteLine(DateTime::Now);
Java

كود :
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));
11- التحويل من متغير أصغر الي صحيح :

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)
C#

كود :
int power(int number)
{
return number^2;
}
//at any event put..
Short x=5;
power(x);
C++

كود :
int power(int number)
{
return number^2;
}
//at any event put..
short x = 5;
power(x);
Java

كود :
int power(int number)
{
return number^2;
}
//at any event put..
short x = 5;
power(x);
12- تحويل المتغيرات :

VB.NET

كود :
Dim myByte As Short , myInt As Integer
myByte = Convert.ToByte(myInt)
C#

كود :
short myByte; int myInt;
myByte = Convert.ToByte(myInt);
[COLOR="#008000"]C++
[/COLOR]
كود :
short myByte; int myInt;
myByte = Convert::ToByte(myInt);
Java

كود :
//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);
13- جمل الشرط :

VB.NET

كود :
If x = 5 Then
    Console.WriteLine("five")
Else
    Console.WriteLine("notFive")
End If
C#

كود :
if (x==5)
    Console.WriteLine("five");
else
    Console.WriteLine("notFive");
C++

كود :
if (x == 5)
    cout<<"five";
else
    cout<<" notFive ";
Java

كود :
if (x == 5)
     System.out.print("five");
else
     System.out.print(" notFive ");
14- جمل الشرط :

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("راسب ");
}
C++

كود :
if (x > 90)
{
Console::WriteLine("ممتاز ");
}
else if (x >= 50)
{
Console::WriteLine("ناجح ");
}
else
{
Console::WriteLine("راسب ");
}
Java

كود :
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
C#

كود :
if ((x < 90 || x>50) && (!name="ahmed"));
[COLOR="#008000"]C++
[/COLOR]
كود :
if ((x < 90 || x>50) && (name != "ahmed"));
[COLOR="#FFA07A"]Java
[/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="#008000"]C++
[/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
    }
C++

كود :
if)id > 0 && SearchForID(id) > 0(
{
       // do something
}
Java

كود :
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
C#

كود :
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;
}
Java

كود :
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
C#

كود :
for (int i = 0; i < 10; i++)
{Console.WriteLine(i); }
[COLOR="#008000"]C++
[/COLOR]
كود :
for (int i = 0; i < 10; i++)
{cout<<I; }

Java

كود :
for (int i = 0; i < 10; i++)
{ System.out.print(I);}
20- باستخدام القفزات For الحلقة التكرارية :

VB.NET

كود :
For i As Integer = 0 To 9 Step 2  
Console.WriteLine(i)  Next
C#

كود :
for (int i = 0; i < 10; i+=2)
{Console.WriteLine(i); }
[COLOR="#008000"]C++
[/COLOR]
كود :
for (int i = 0; i < 10; i+=2)
{cout<<I; }
[COLOR="#FFA07A"]Java
[/COLOR]
كود :
for (int i = 0; i < 10; i+=2)
{System.out.printIn(i); }
21- باستخدام القفزات While الحلقة التكرارية :

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++;
}
C++

كود :
int x = 0;
while (x < 10)
{
Console.WriteLine(x);
x++;
}
Java

كود :
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"
C#

كود :
string s;
do
{
s = Console.ReadLine();
Console.WriteLine(s);
}
while(s!="exit");
[COLOR="#008000"]C++
[/COLOR]
كود :
String ^s;
do
{
s = Console::ReadLine();
Console::WriteLine(s);
}
While (s != "exit");
Java

كود :
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");
: For Each الحلقة التكرارية23 -

[COLOR="#0000FF"]VB.NET
[/COLOR]
كود :
Dim x As Integer() = {10, 20, 30, 40}
For Each i As Integer In x
    Console.WriteLine(i)
Next
C#

كود :
int[] x = { 10, 20, 30, 40 };
foreach (int i in x)
Console.WriteLine(i);
C++

كود :
Array<int> ^x = { 10, 20, 30, 40 };
for each (int i in x)
Cout<<i;
Java

كود :
//هذا النوع من الحلقات غير متوافر
int[] x = {01,20,30,40};
for (int i = 0; i < x.length; i++) {
    System.out.println(i);
}
24- Try Method أسلوب أقتناص الأخطاء :

VB.NET

كود :
try
'code
Catch ex As Exception
End try
C#

كود :
try
{
//code
}
catch (Exception ex)
{
}
C++

كود :
try
{
//code
}
catch (Exception ^ex)
{
}
Java

كود :
try
{
//code
}
catch (RuntimeException  ex)
{
}
25- Hello World طباعة جملة :

VB.NET

كود :
Module Module1
    Sub Main()
         Console.Write("Hello World")
         Console.ReadKey()
    End Sub
End Module
C#

كود :
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();
            }
}
Java

كود :
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:
26- أسلوب كتابة الدوال :

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
C#

كود :
static int sum(int number1, int number2)
{
  int total = number1 + number2;
  return total;
}
[COLOR="#008000"]C++
[/COLOR]
كود :
static int sum(int number1, int number2)
{
  int total = number1 + number2;
  return total;
}
Java

كود :
private static int sum(int number1, int number2)
{
   int total = number1 + number2;
   return total;
}
27- أسلوب أستدعاء الدوال :

VB.NET

كود :
Dim result As Integer = sum(5, 8)
Console.Write(result)
Console.ReadKey()
C#

كود :
int result = sum(5, 8);
Console.Write(result);
Console.ReadKey();
C++

كود :
int result = sum(5, 8);
cout<<result;
Java

كود :
int result = sum(5, 8);
System.out.print(result);
28- Methods أسلوب كتابة الطرق :

VB.NET

كود :
Private Sub printmsg(ByVal msg As String)
    Console.WriteLine(msg)  
End Sub
C#

كود :
void printmsg(string msg)
{
    Console.WriteLine(msg);
}

[COLOR="#008000"]C++
[/COLOR]
كود :
void printmsg(string msg)
{
Cout<<msg;
}
[COLOR="#FFA07A"]Java
[/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)
C#

كود :
static void sum(int number1, int number2, out int total)
{
   total = number1 + number2;
}
//usage
sum(5, 8,out result);
C++

كود :
static void sum(int number1, int number2, [System::Runtime::InteropServices::Out] int %total)
{
   total = number1 + number2;
}
//usage
sum(5, 8,out result);
Java

كود :
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
C#

كود :
static void sub(ref int number1, ref int number2)
      {
            int result = number1 - number2;
            return result;_
      }_
C++

كود :
private :Void sub(int %number1, int %number2)
{
                                    int result = number1 - number2;
                                    //return result; in c++ void function can not return values
}
Java

كود :
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;
            }
}
31- تعريف أبسط المصفوفات :

VB.NET

كود :
Dim intarray As Integer() = New Integer(4)

C#

كود :
int [] intarray = new int[5];
C++

كود :
array<int> ^intarray = gcnew array<int>(5);
Java

كود :
int[] intarray = new int[5];
32- تعريف أبسط المصفوفات :

VB.NET

كود :
Dim intarray As Integer() = New Integer() {15, 20, 13}
C#

كود :
int[] intarray = new int[] { 15, 20, 13 };
C++

كود :
array<int> ^intarray = gcnew array<int> {15, 20, 13};
Java

كود :
int[] intarray = new int[] {15, 20, 13};
33- المصفوفات متعددة الابعاد :

VB.NET

كود :
Dim matrix As Integer = New Integer(2, 2)
‘To use it..
matrix(1, 2) = 20
C#

كود :
int matrix = new int[2,2];
//To use it..
matrix[1,2]=20;
C++

كود :
int matrix = gcnew array<int, 2>(2,2);
//To use it..
matrix[1,2] = 20;
Java

كود :
int[][] matrix = new int[2][2];
//To use it..
matrix[1][2] = 20;
34- Structures التراكيب :

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
C#

كود :
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;
C++

كود :
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;
Java

كود :
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;
35- Struct أنشاء الدوال داخل ال :

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
C#

كود :
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;
}
}
Java

كود :
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”;
C++

كود :
this
EX:
this->Text= “Form”
Java

كود :
this
EX:
this.setTitle("Form");
37- التعامل مع مربع النص :

VB.NET

كود :
TextBox1.Text = “Friendassist”

C#

كود :
textBox1.Text = “Friendassist”;

C++

كود :
textBox1->Text = “Friendassist”;
Java

كود :
jTextField1.setText("Friendassist");
38- جعل مربع النص لا يقبل سوي أرقام :

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="#00FF00"]C#
[/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;
   }}
Java

كود :
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 {
    }        
    }
39- تفريغ جميع حقول النص في آن واحد :

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)
C#

كود :
private void ClearAllTextBox(Control m){
   foreach (Control cc in m.Controls){
   if (cc.GetType() ==typeof ( TextBox))  
   ((TextBox)cc).Clear();}
}
//usage..
ClearAllTextBox(this);
C++

كود :
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);
Java

كود :
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);
40- تعريف أبسط الفئات :

VB.NET

كود :
Namespace ConsoleApplication1
Class Person
‘Functions and Main function of code ….
End Class
End Namespace
C#

كود :
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
{
}
Java

كود :
package ConsoleApplication1;
public class Person
{
// Functions and Main function of code ….
}
41- الفئات المعلنة :

VB.NET

كود :
Class Person
Public FirstName As String
Public Last-Named As String
Public Age As Integer
End Class
C#

كود :
class Person
{
public string FirstName;
public string LastName;
public int Age;
}
C++

كود :
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;
}
42- تعريف كائنات الفئة أو أعلان الكائن :

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"
C#

كود :
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";
C++

كود :
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";
Java

كود :
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";
43- تعريف المتغيرات السابقة من خلال مصفوفة :

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
C#

كود :
Person [] MyEmpolyee = new Person[3];
MyEmpolyee[0] = new Person();
MyEmpolyee[0].FirstName = "Ahmed";
MyEmpolyee[0].LastName = "Gamal";
MyEmpolyee[0].Age = 15;
C++

كود :
array<Person^> ^MyEmpolyee = gcnew array<Person^>(3);
MyEmpolyee[0] = gcnew Person();
MyEmpolyee[0]->FirstName = "Ahmed";
MyEmpolyee[0]->LastName = "Gamal";
MyEmpolyee[0]->Age = 15;
Java

كود :
Person[] MyEmpolyee = new Person[3];
MyEmpolyee[0] = new Person();
MyEmpolyee[0].FirstName = "Ahmed";
MyEmpolyee[0].LastName = "Gamal";
MyEmpolyee[0].Age = 15;
44- Constructors المشيدات :

VB.NET

كود :
Public Sub New(ByVal userfirstname As String)
FirstName = userfirstname
End Sub
C#

كود :
public Person(string userfirstname)
{
FirstName = userfirstname;
}
C++

كود :
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;
}
45- تهيئة المشيد في ابسط الحالات :

VB.NET

كود :
Public Sub New()
Console.WriteLine("new object")
End Sub
C#

كود :
public Person()
{
Console.WriteLine("new object");
}
C++

كود :
public:
Person();
private:
<missing_class_definition>::Person()
{
Console::WriteLine("new object");
}
Java

كود :
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")
C#

كود :
//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");
C++

كود :
//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");
Java

كود :
//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

الرد }}}
تم الشكر بواسطة: Anas Mahmoud
#2
ما شاء الله عليك جزاك الله كل خير
الرد }}}
تم الشكر بواسطة:
#3
ماشاء الله
يتبين لي من الموضوع ان فيجوال بيسك دوت نت هي الاسهل على الاطلاقSmile
الرد }}}
تم الشكر بواسطة:
#4
مشكوور عالموضوع الرائع
سكس سحاق سكس مصري سكس حيوانات افلام سكس مصري قصص سكس محارم
الرد }}}
تم الشكر بواسطة: elgokr
#5
يعطيك العافيه
الرد }}}
تم الشكر بواسطة:


التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم