Now open your Visual Studio and create a new C# project. If you haven’t installed Visual Studio, install it.
static void Main(string args)
To create a simple program to print “Hello World!” text on the console window, you need to add a line of code in Main procedure block:
Console.WriteLine("Hello World!");//a simple Hello World program
To wait for key press before program exits, we need another line of code:
Console.ReadLine();//Gets user's key press and then exits
Now, press F5 to run your program.
This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages: