c# programming hands on lab v1
TRANSCRIPT
![Page 1: C# programming Hands On Lab V1](https://reader036.vdocuments.us/reader036/viewer/2022062503/58cee8771a28ab333d8b5775/html5/thumbnails/1.jpg)
C# Programming Guide
Mr.Suttipong Kullawattana
![Page 2: C# programming Hands On Lab V1](https://reader036.vdocuments.us/reader036/viewer/2022062503/58cee8771a28ab333d8b5775/html5/thumbnails/2.jpg)
To create and run a console application• Start Visual Studio.• On the menu bar, choose File, New, Project.• The New Project dialog box opens.• Expand Installed, expand Templates, expand Visual C#, and then choose Console
Application.• In the Name box, specify a name for your project, and then choose the OK button.• The new project appears in Solution Explorer.• If Program.cs isn't open in the Code Editor, open the shortcut menu
for Program.cs in Solution Explorer, and then choose View Code.• Replace the contents of Program.cs with the following code.
![Page 3: C# programming Hands On Lab V1](https://reader036.vdocuments.us/reader036/viewer/2022062503/58cee8771a28ab333d8b5775/html5/thumbnails/3.jpg)
Choose the F5 key to run the project. A Command Prompt window appears that contains the line Hello World!
![Page 4: C# programming Hands On Lab V1](https://reader036.vdocuments.us/reader036/viewer/2022062503/58cee8771a28ab333d8b5775/html5/thumbnails/4.jpg)
Comment
![Page 5: C# programming Hands On Lab V1](https://reader036.vdocuments.us/reader036/viewer/2022062503/58cee8771a28ab333d8b5775/html5/thumbnails/5.jpg)
Main Method
![Page 6: C# programming Hands On Lab V1](https://reader036.vdocuments.us/reader036/viewer/2022062503/58cee8771a28ab333d8b5775/html5/thumbnails/6.jpg)
Input & Output
![Page 7: C# programming Hands On Lab V1](https://reader036.vdocuments.us/reader036/viewer/2022062503/58cee8771a28ab333d8b5775/html5/thumbnails/7.jpg)
General Structure of a C# Program
![Page 8: C# programming Hands On Lab V1](https://reader036.vdocuments.us/reader036/viewer/2022062503/58cee8771a28ab333d8b5775/html5/thumbnails/8.jpg)
Classes (C# Programming Guide)
![Page 9: C# programming Hands On Lab V1](https://reader036.vdocuments.us/reader036/viewer/2022062503/58cee8771a28ab333d8b5775/html5/thumbnails/9.jpg)
![Page 10: C# programming Hands On Lab V1](https://reader036.vdocuments.us/reader036/viewer/2022062503/58cee8771a28ab333d8b5775/html5/thumbnails/10.jpg)
![Page 11: C# programming Hands On Lab V1](https://reader036.vdocuments.us/reader036/viewer/2022062503/58cee8771a28ab333d8b5775/html5/thumbnails/11.jpg)
![Page 12: C# programming Hands On Lab V1](https://reader036.vdocuments.us/reader036/viewer/2022062503/58cee8771a28ab333d8b5775/html5/thumbnails/12.jpg)
Structs (C# Programming Guide)
![Page 13: C# programming Hands On Lab V1](https://reader036.vdocuments.us/reader036/viewer/2022062503/58cee8771a28ab333d8b5775/html5/thumbnails/13.jpg)
Namespaces
![Page 14: C# programming Hands On Lab V1](https://reader036.vdocuments.us/reader036/viewer/2022062503/58cee8771a28ab333d8b5775/html5/thumbnails/14.jpg)
Interfaces
![Page 15: C# programming Hands On Lab V1](https://reader036.vdocuments.us/reader036/viewer/2022062503/58cee8771a28ab333d8b5775/html5/thumbnails/15.jpg)
Interfaces
![Page 16: C# programming Hands On Lab V1](https://reader036.vdocuments.us/reader036/viewer/2022062503/58cee8771a28ab333d8b5775/html5/thumbnails/16.jpg)
![Page 17: C# programming Hands On Lab V1](https://reader036.vdocuments.us/reader036/viewer/2022062503/58cee8771a28ab333d8b5775/html5/thumbnails/17.jpg)
![Page 18: C# programming Hands On Lab V1](https://reader036.vdocuments.us/reader036/viewer/2022062503/58cee8771a28ab333d8b5775/html5/thumbnails/18.jpg)
![Page 19: C# programming Hands On Lab V1](https://reader036.vdocuments.us/reader036/viewer/2022062503/58cee8771a28ab333d8b5775/html5/thumbnails/19.jpg)
How to: Implement Interface Events
An interface can declare an event. The following example shows how to implement interface events in a class. Basically the rules are the same as when you implement any interface method or property.
To implement interface events in a class• Declare the event in your class and then invoke it in the appropriate areas.
![Page 20: C# programming Hands On Lab V1](https://reader036.vdocuments.us/reader036/viewer/2022062503/58cee8771a28ab333d8b5775/html5/thumbnails/20.jpg)
![Page 21: C# programming Hands On Lab V1](https://reader036.vdocuments.us/reader036/viewer/2022062503/58cee8771a28ab333d8b5775/html5/thumbnails/21.jpg)