Maha EL-basuony<br />Dot Net Framework-C Sharp<br />
    Agenda<br />
Before Dot Net Framework <br />-Program<br />             Set of commands in logical order<br />-LLL(Low Level Language)<b...
-Your applications written by High Level Language (HLL) But Your machine (Computer , Mobile , Projector ……..etc)<br />Unde...
Java<br />Your Application    “VB6” <br />Compiler<br />Compiler JVM<br />
DOT NET Framework<br />
Java<br />VB.net<br />P.net<br />C#.net<br />MSIL<br />CLR<br />Compiler JVM<br />
.NET Framework Versions<br />
C Sharp<br />
-Writing a C# Program<br />-Variables & Expressions<br />-Flow Control<br />-More About Variables<br />-Functions<br />-De...
Writing a C# Program<br />Console.Write(“Hello World n ”) ;<br />
Console properties<br />
Variables & Expressions<br />Declaring Variables<br /><Type> <VarName>;<br />            <Type> <VarName>=Value;<br />    ...
Variables types<br />Integer Variables<br />
Float Variables<br />String Variables<br />
The basic variable naming rules are as follows:<br />1-First character of a variable name must be either (a  letter, an un...
For example, the following variable names are fine:<br />    myBigVar<br />    VAR1   <br />    _test <br />These are not,...
Accept Values From User<br />
Expressions<br />Mathematical Operators<br />
Assignment Operators<br />
Examples<br />
 Operator Precedence <br />
Flow Control<br /> Boolean comparisons <br />
 Some other Boolean operators<br />
 The   go to  statement is used as follows: <br />goto  <  label Name  > <br /> Labels are defined as follows: <br /> <  l...
-If statement <br />-Ternary  operator   <br />-Switch  statement <br />
If statement<br />if (expression)<br />{<br />  do something<br />}<br />If-Else<br />if (expression)<br />   statement1  ...
Ternary  operator<br />< expression >  ?  <   resultIfTrue  >  :  <   resultIfFalse  ><br />
Switch  statement<br />switch (expression) <br />{<br />   case constant-expression: <br />         //your code here<br />...
-For statement <br />-While Statement<br />-do-while  statement<br />
For statement<br />for (initializers; expression; iterators) <br />        statement    <br />
While Statement<br />while (expression) statement <br />
do-while  statement<br />do statement while (expression); <br />
-Implicit conversion<br />-Explicit conversion<br />Type Conversion<br />-Implicit conversion<br />
-Explicit conversion<br />-Casting<br />-Convert<br />
-Enumerations<br />- Structs<br />-Arrays  <br />
Enumerations<br />enum   type Name <br />{<br />     value1 ,<br />     value2 ,<br />     value3 ,<br />   ...<br />     ...
enum   typeName  :   underlyingType <br />{<br />     value1  =   actualVal1 <br />     value2  =   actualVal2 <br />     ...
Structs<br />struct  <  typeName  > <br />{<br />    <  memberDeclarations  > <br />} <br />
 -Dot Net Framework<br />-Writing a C# Program<br />-Variables & Expressions<br />-Flow Control<br />-More About Variables...
Q & A<br />Thanks<br />
Upcoming SlideShare
Loading in …5
×

C sharp fundamentals Part I

953 views

Published on

Published in: Technology
1 Comment
1 Like
Statistics
Notes
No Downloads
Views
Total views
953
On SlideShare
0
From Embeds
0
Number of Embeds
45
Actions
Shares
0
Downloads
25
Comments
1
Likes
1
Embeds 0
No embeds

No notes for slide

C sharp fundamentals Part I

  1. 1. Maha EL-basuony<br />Dot Net Framework-C Sharp<br />
  2. 2. Agenda<br />
  3. 3. Before Dot Net Framework <br />-Program<br /> Set of commands in logical order<br />-LLL(Low Level Language)<br /> collection of zeros & ones<br />
  4. 4. -Your applications written by High Level Language (HLL) But Your machine (Computer , Mobile , Projector ……..etc)<br />Understand only Low Level Language (LLL) So Compiler Used<br />
  5. 5. Java<br />Your Application “VB6” <br />Compiler<br />Compiler JVM<br />
  6. 6. DOT NET Framework<br />
  7. 7. Java<br />VB.net<br />P.net<br />C#.net<br />MSIL<br />CLR<br />Compiler JVM<br />
  8. 8. .NET Framework Versions<br />
  9. 9. C Sharp<br />
  10. 10. -Writing a C# Program<br />-Variables & Expressions<br />-Flow Control<br />-More About Variables<br />-Functions<br />-Debugging & Error Handling<br />
  11. 11. Writing a C# Program<br />Console.Write(“Hello World n ”) ;<br />
  12. 12. Console properties<br />
  13. 13. Variables & Expressions<br />Declaring Variables<br /><Type> <VarName>;<br /> <Type> <VarName>=Value;<br /> <Type> <Var1Name>,<Var2Name>…..;<br />
  14. 14. Variables types<br />Integer Variables<br />
  15. 15. Float Variables<br />String Variables<br />
  16. 16. The basic variable naming rules are as follows:<br />1-First character of a variable name must be either (a letter, an underscore character ( .( _ ), at symbol ( @ ))<br />2-Subsequent characters may be letters, underscore characters, or numbers. <br />3-keywords that have a specialized meaning to the C# compiler, such as using ,namespace keywords<br />
  17. 17. For example, the following variable names are fine:<br /> myBigVar<br /> VAR1 <br /> _test <br />These are not, however:<br /> 99BottlesOfBeer<br /> namespace<br /> It’s-All-Over <br />
  18. 18. Accept Values From User<br />
  19. 19. Expressions<br />Mathematical Operators<br />
  20. 20.
  21. 21.
  22. 22. Assignment Operators<br />
  23. 23. Examples<br />
  24. 24. Operator Precedence <br />
  25. 25.
  26. 26. Flow Control<br /> Boolean comparisons <br />
  27. 27. Some other Boolean operators<br />
  28. 28. The go to statement is used as follows: <br />goto < label Name > <br /> Labels are defined as follows: <br /> < label Name > <br />
  29. 29.
  30. 30.
  31. 31. -If statement <br />-Ternary operator <br />-Switch statement <br />
  32. 32. If statement<br />if (expression)<br />{<br /> do something<br />}<br />If-Else<br />if (expression)<br /> statement1 <br />else <br /> Statement2<br />
  33. 33.
  34. 34. Ternary operator<br />< expression > ? < resultIfTrue > : < resultIfFalse ><br />
  35. 35. Switch statement<br />switch (expression) <br />{<br /> case constant-expression: <br /> //your code here<br /> Break;<br /> default: <br /> //your code here<br /> Break;<br />} <br />
  36. 36.
  37. 37. -For statement <br />-While Statement<br />-do-while statement<br />
  38. 38. For statement<br />for (initializers; expression; iterators) <br /> statement <br />
  39. 39.
  40. 40.
  41. 41. While Statement<br />while (expression) statement <br />
  42. 42. do-while statement<br />do statement while (expression); <br />
  43. 43. -Implicit conversion<br />-Explicit conversion<br />Type Conversion<br />-Implicit conversion<br />
  44. 44. -Explicit conversion<br />-Casting<br />-Convert<br />
  45. 45.
  46. 46. -Enumerations<br />- Structs<br />-Arrays <br />
  47. 47. Enumerations<br />enum type Name <br />{<br /> value1 ,<br /> value2 ,<br /> value3 ,<br /> ...<br /> valueN <br />} <br />enum typeName : underlyingType <br />{<br /> value1 <br /> value2 <br /> value3 <br /> ...<br /> valueN <br />} <br />
  48. 48. enum typeName : underlyingType <br />{<br /> value1 = actualVal1 <br /> value2 = actualVal2 <br /> value3 = actualVal3 <br /> ...<br /> valueN = actualValN <br />} <br />enum typeName : underlyingType <br />{<br /> value1 = actualVal1 <br /> value2 = value1 <br /> value3 <br /> ...<br /> valueN = actualValN <br />} <br />
  49. 49.
  50. 50. Structs<br />struct < typeName > <br />{<br /> < memberDeclarations > <br />} <br />
  51. 51.
  52. 52.
  53. 53. -Dot Net Framework<br />-Writing a C# Program<br />-Variables & Expressions<br />-Flow Control<br />-More About Variables<br />
  54. 54. Q & A<br />Thanks<br />

×