Classes, structures, modules, enumerations, interfaces, and delegates—the major .NET types—don't just float around in the code of your application. They must all be grouped and managed into namespaces. As described in Chapter 1, namespaces provide a hierarchy for your types, sort of a tree-shaped condominium where each type has a home. Some of those homes (or nodes), such as
System, get pretty crowded with all those type families living there. Others, such as
System.Timers, may have only a few types dwelling in their ample abodes. But every type must live in the hierarchy; none of the types is adventurous enough to strike out on its own and build a ranch house.
At the very root of the hierarchy is
Global, not a node itself, but a Visual Basic keyword that indicates the root of all roots. You can include
Global when referencing your namespaces, but its use is required only when leaving it out would cause confusion between two namespace branches.
Global are the few top-level namespaces, including
Microsoft. Each top-level namespace contains subordinate namespaces, and each of those can contain additional third-level namespaces, and so on. Namespace nodes are referenced relative to one another using a "dot" notation.
This specifies the third-level
Forms namespace. You could also have typed:
which means the same thing. Relative namespaces are also supported:
However, to use relative namespaces, you must ...