Create a Simple Hello World! App in C#

Below is sample code which can be used to run a simple “Hello World!” console application in C#.

The code can be ran using an IDE like Visual Studio. Just copy and paste in a new Visual Studio project and run:

 

using System;

namespace HelloWorld
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
        }
    }
}