Hello World and Program Structure
A C# application starts in Main. The using directive makes framework types available without fully qualified names.
How it works
Understand the entry point and the structure of a C# console program.
Main is static because the runtime calls it before an object exists. Console.WriteLine writes a line to standard output.
Runnable C# example
Program.cs
using System;
class Program
{
static void Main()
{
Console.WriteLine("Hello, C#!");
}
}
Hello, C#!Practice with the debugger
Set a breakpoint on an important assignment or condition, click Debug, and inspect the local values before stepping to the next line.