
8 Language Overview
8.1 Getting startedThe canonical "hello, world" program can be written as follows:
using System;
class Hello
{
static void Main() {
Console.WriteLine("hello, world");
}
}
The source code for a C# program is typically stored in one or more text files with a file extension of .cs, as in hello.cs. Using a command-line compiler, such a program can be compiled with a command line like csc hello.cswhich produces an application named hello.exe. The output produced by this application when it is run is:
hello, worldClose examination of this program is illuminating:
| |
| Jagger Software Ltd | |
| Company # 4070126 | |
| VAT # 762 5213 42 |