You can type C# code in any editor such as NotePad, Wordpad etc. Type these lines and save files as .cs extension. Now run from command line csc filename.
Here is my first C# program. The output of this program on the console is "Hello, C#, World!".
// using system
using System;
class Hello
{
static void Main()
{ // display output on console
Console.WriteLine("Hello,C# World!");
}
}
Quick Method: Download attached file mc1.cs and run from command line csc second.cs.