InterviewSolution
Saved Bookmarks
| 1. |
What are the main parts of a C# program? |
|
Answer» The MAIN parts of a C# program are given as follows:
A BASIC program that DEMONSTRATES all these parts is given as follows: using System; namespace Demo { class Program { static void Main(string[] args) { // This program finds the sum of two NUMBERS int a = 5, b = 9, c; c = a + b; Console.WriteLine("Sum of {0} and {1} is {2}", a, b, c); } } }The output of the above program is given as follows: Sum of 5 and 9 is 14Now, the various parts of the program are explained as follows:
|
|