Wednesday, 4 February 2015

Hello world in C#

According to the tradition we will start our programming in c# with "Hello world". As suggested we have to write our code on visual studio. Their are some steps before our programming starts
  1. Select file.
  2. New Project.
  3. Select Console Application from the project dialog.
After clicking OK your visual studio will create a new project including a file 'Program.cs'.
Now screen should look something like this.





We have to write our code within the the set of { } appearing after line static void Main (string[] args). The code will be:

Console.WriteLine("Hello, World!");
Console.ReadLLine();





After writing the code press clt+F5. The compiler will generate a black screen having output. 


No comments:

Post a Comment