The obligatory example for any language,

 
using System;
public class HelloWorld
{
    public static void Main(string[] args) {
            Console.Write("Hello World!");
    }
}

Raw CSharp compiler

You can compile c# using the command line version
C:>csc HelloWorld.cs

and then run the new program by entering

HelloWorld

You can get Nant, a build tool like the old 'make', from http://sourceforge.net/projects/nant.

Reference By http://www.fincher.org/tips/Languages/csharp.shtml