# البرمجة لغة السي شارب2 .pdf

Document Sample

```					               ‫ا‬
‫رب‬      ‫ا‬
C sharp
……………………………….
Section 2

welcome in c#            ‫م‬

namespace
{
Class program
{
static void main (string [] args)
{
Console.write ("welcome in C#");
}
}
}

Type of variable
‫اذا ارد‬           ‫ات‬        ‫ت‬        ‫ا‬
‫ن ا ا ة‬         ‫ان‬     ‫ا ا ة‬        ‫ر‬
‫و‬
integer               ‫د‬     ‫نا ع‬
int
string ‫ن‬      ‫ا‬         ‫وھ ا اذا ارد‬
‫ف اذا ن‬      ‫ا‬                                ‫ ھ‬c#     : ‫ظ‬
capital or small

Console        ‫و ا‬Class

‫ا اع ا‬
‫ات‬
int                                             ‫د‬
char                                          ‫ف‬
string                                  ‫ا او ة وف‬
double         ‫ي‬         ‫او‬           ‫او‬        ‫د‬
decimal                                     ‫ي‬    ‫د‬
Etc

string name="welcome";
string           welcome
name       ‫وا‬
int x=3;
int        x              ‫ا‬     3 ‫ر‬
x=x+7;
‫ا ف‬                 ‫فا‬     ‫با‬           ‫ان‬                      ‫ھ‬
‫ا ر اي‬
int x,y;
x=7;                   x 7        y 8
y=8;

x=2*y+x;               x 23           y 8
Console.write(x);
Console.write ("x = {0}", x);

Console.write ("x={0},y={1}",x,y);

Console.write("x={1},y={0}",x,y);

‫ر‬

int x,y,z;
x=10;
y=3;
z=x+y;
console.write (z);
………………………………..
‫ا‬
int x,y,z;
z=x+y;
Console.write(z);
Formatted output
Console.writeLine("the sum is {0}",z);
X=3;
Y=3;
M=10;

int x=3,y=3,m=10;
Console.Writeline("num x={0},y={1},m={2}",x,y,z);

Hi
You
Welcome

Console.WriteLine("hi\n you\n Welcome");

‫ا‬             ‫ا ا ة‬     ‫ب‬
Double area,r;
Console.writeLine("enter r");
area=r*r*math.PI;
Console.write (area);

‫ءﷲ‬   ‫وان‬     ‫ا ة حا‬          ‫ده‬           ‫ا‬            ‫ول ان‬
‫ا دم‬              ‫ا‬                 ‫ا‬

‫م‬   ‫ك‬                                     ‫ا‬
‫وا م‬     ‫وا‬      ‫ات ا‬                ‫ث‬       ‫و‬
‫م‬    ‫ك‬    ‫ج‬    ‫م و‬   ‫ر وا‬   ‫وا‬          ‫ك‬

‫ا ا ء‬
Section 3
ha_vi_st@yahoo.com            ‫ن‬      ‫د‬                     /‫م‬

```
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
 views: 63 posted: 10/18/2012 language: English pages: 4