As mentioned earlier in this book, the .NET Framework is composed of classesmany classes. Namespaces are the method used to create a hierarchical structure of all these classes, and they help prevent naming collisions. A naming collision occurs when two classes have the same name. Because namespaces provide a hierarchy, it's possible to have two classes with the same name as long as they exist in different namespaces. Namespaces, in effect, create scope for classes. The base namespace in the .NET Framework is the System namespace. The System namespace contains classes for garbage collection (discussed shortly), exception handling, data typing, and so much more. The System namespace is just the tip of the iceberg. There are literally dozens of namespaces. Table 24.1 lists some of the more common namespaces, many of which you've used in this book. All the controls that you've placed on forms and even the forms themselves belong to the System.Windows.Forms namespace. Use Table 24.1 as a guide; if a certain name-space interests you, I suggest that you research it further in the Visual Studio .NET online help.
By the Way All Microsoft-provided namespaces begin with either System or Microsoft. Other vendors can provide their own namespaces, and it's possible for you to create your own custom namespaces as well, but that's beyond the scope of this book. |