Содержание
- 2. Your First C# Program Our first C# program is a real classic. It does nothing more
- 3. This program sends the simple greeting to the console // Example1_1.cs // This program sends a
- 4. A Closer Look to the strucure of C# program In C#, as in other C-style languages,
- 5. Variables in C# We declare variables in C# using the following syntax: DataType variableName; // or
- 6. Initialization of Variables Can’t do this ! Need to initialize d befor use Would only create
- 7. Variable scope
- 8. Scope clashes for local variables public static i n t Main(){ int j = 20; We
- 9. Scope clashes for fields and local variables class ScopeTest2 { static int j = 20; public
- 10. Constants const int a = 10 0 ; // This value cannot be chang e They
- 11. Statements Programs consist of sequences of C# statements Conditional statements Loops Statements allow us to control
- 12. Conditional statements The if statement One - way if if ([condition]) [code to execute] if ([condition])
- 13. The switch statement switch ([expression to check]) { case [test1]: ... [exit case statement] case [test2]:
- 14. Loops C# provides four different loops The for loop The do … while loop Loops allow
- 15. The for loop Syntax for (int i = 0; i { // Code to loop, which
- 16. Nested loops Example static void Main(string[] args) { // This loop iterates through rows... for (int
- 17. The while loop while ([condition]) { [Code to loop] } Syntax double balance = 100D; double
- 18. The do … while loop The do...while loop is the post-test version of the while loop
- 19. The foreach loop The foreach loop allows us to iterate through each item in a collection.
- 20. Jump statements C# provides the number of statements that allow us to jump to another line
- 21. Classes and Structs Classes and structs are templates form wich we can create objects. Each object
- 22. Classes Members Data members are those members that contain the data for the class – fields,
- 23. Classes Members Fields are any variables associated with the class. We can access these fields using
- 24. Function Members Function members are those members that provide some functionality for manipulating the data in
- 25. Declaring methods The definition of the method consists: method modifiers, the type of return value, the
- 26. Passing parameters to methods class ParameterTest{ s ta t ic void SomeFunction(int[] ints , int i)
- 27. Ref parameters // define method stati c v oid SomeFunction(int[] ints, re f int i) {
- 28. Out parameters // define method stati c v oid SomeFunction(out int i) { i = 100;
- 29. Properties The idea of a property is that it is a method or pair of methods
- 30. To define a property… We use the following syntax: The get accessor takes no parameters and
- 31. To define a property… private string foreNam e; p ublic string ForeName{ get { r eturn
- 33. Скачать презентацию










![Conditional statements The if statement One - way if if ([condition]) [code](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/382500/slide-11.jpg)
![The switch statement switch ([expression to check]) { case [test1]: ... [exit](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/382500/slide-12.jpg)


![Nested loops Example static void Main(string[] args) { // This loop iterates](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/382500/slide-15.jpg)
![The while loop while ([condition]) { [Code to loop] } Syntax double](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/382500/slide-16.jpg)








![Passing parameters to methods class ParameterTest{ s ta t ic void SomeFunction(int[]](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/382500/slide-25.jpg)
![Ref parameters // define method stati c v oid SomeFunction(int[] ints, re](/_ipx/f_webp&q_80&fit_contain&s_1440x1080/imagesDir/jpg/382500/slide-26.jpg)




США в XIX веке
Тема 1
Культура начала ХХ века. 11 класс
Связь между сложением и вычитанием
Я - ученик 21 века«Если интересно пробуй…»
История специальной педагогики
Идеальные родители глазами детей, идеальный ребенок глазами родителей
Tip_Mollyuski
Презентация на тему Элементы комбинаторики (9 класс)
Правила дорожного движения для велосипедистов
Собор Парижской Богоматери
ООО «ПОЛИМЕРТОРГ»
Презентация на тему Боевые искусства Древней Руси
Экстрапирамидная система и синдромы ее поражения
Долобене гель
Словестные задачи
Николай Николаевич Носов
Век пластмасс
Управление имиджем
Графический редактор PAINT
РЕЗУЛЬТАТЫ ЕГЭ ПО БИОЛОГИИ 2009
Взаимодействие лекарственных средств
о проведенииВсекубанского Олимпийского урока
Имбирные пряники
D3 Environment Lesson 9 Discrimination
212685
Презентация на тему Священные сооружения (4 класс)
Творчество Леонардо да Винчи