1.4. Anatomy of a Simple C# Program

One of the simplest of all C# applications, the classic "Hello" program, is shown in Figure 1-1.

Figure 1.1. Anatomy of a simple C# program

Let's go over the key elements of our simple program.

1.4.1. The using System; Statement

The first line of the program is required for our program to compile and run properly, by providing the compiler with knowledge of the types in the System namespace, which is a logical grouping of predefined C# programming elements (in the case of C#, part of the FCL mentioned earlier):

using System;

We'll defer a detailed explanation of namespaces until Chapter 13; for now, simply ...

Get Beginning C# 2008 Objects: From Concept to Code now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.