A C# program begins with a call to Main() : Intrduction « Language Basics « C# / CSharp Tutorial






This is a simple C# program.

Call this program Example.cs.

using System; 
 
class MainClass { 
   
  public static void Main() { 
    Console.WriteLine("A simple C# program."); 
  } 
}
A simple C# program.








1.1.Intrduction
1.1.1.A C# program begins with a call to Main()
1.1.2.Using csc.exe, the C# Command-Line Compiler
1.1.3.The C# Keywords
1.1.4.C# has the following reserved keywords:
1.1.5.Compile csharp source code in command line