The Mono C# compiler is command-line compatible with the Microsoft .NET Framework C# compiler. If you were entering examples from a Microsoft .NET tutorial or .NET centric book, generally you could substitute mcs for any mention of csc, and it should work OK.
Type this source in your favourite editor (like notepad) and save it as "hello.cs" somewhere.
Now open a new console window, change to that directory and type:
mcs hello.csThis command produces a file named HelloWorld.exe in the current directory. This file contains our program, ready to run.
mono hello.exe