Understanding Namespaces

One of the main advantages of object-oriented programming is code reuse; classes can be shared among programs. By using already-written classes you can save yourself a lot of work. An organizational unit containing shared code components is known as a namespace. One of the most exciting things about Visual Basic .NET is the amount of functionality available from classes built into the .NET framework. Table 5.1 lists a few examples of some namespaces provided by the .NET framework for use in your programs.

Table 5.1. Examples of Namespaces
Name Purpose
System.Math Mathematical functions
System.Drawing.Graphics Drawing lines, and so on
System.Windows.Forms Windows Forms
System.Diagnostics Diagnostics, error log
Microsoft.VisualBasic ...

Get Special Edition Using Microsoft® Visual Basic® .NET 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.