Using Namespaces in Your Applications

Each time you create a new application using Visual Studio .NET, default namespaces are added to the application based on the default functionality of the project type you selected. For example, if you create a Windows Forms application, the System.Windows.Forms namespace is automatically added to your project. To see what's added by default to each project you create, you can drill into the References node of the Solution Explorer. An example of the references for a new C# Windows Forms application is shown in Figure 9.3.

Figure 9.3. The default references for a C# Windows Forms application.

By adding references ...

Get Sams Teach Yourself Visual Studio® .NET 2003 in 21 Days 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.