The Canonical “Hello World” Example

I'm fairly certain that by law it is required for every programming book to provide the famous “Hello World” example. So, rather than face potential criminal charges, a walkthrough for creating a Console C# “Hello World” application follows.

Begin by staring Visual Studio .NET and selecting File, New Project. Next, select a C# console application and name it Hello World as shown in Figure 2.3.

Figure 2.3. Creating a .NET console application for Hello World.

Visual Studio .NET will create a default source file, Class1.cs, and provide some basic boilerplate code as shown in Listing 2.4.

Get Microsoft® Visual C#® .NET 2003 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.