Information Technology Reference
In-Depth Information
More About Namespaces
There are several other important points you should know about namespaces:
￿
Every type name in a namespace must be different from all the others.
￿
The types in a namespace are called members of the namespace.
￿
A source file can contain any number of namespace declarations, either sequentially or
nested.
Figure 10-6 shows a source file on the left that declares two namespaces sequentially, with
several types in each one. Notice that even though the namespaces contain several class names
in common, they are differentiated by their namespace names, as shown in the assembly at the
right of the figure.
Figure 10-6. Multiple namespaces in a source file
The .NET Framework BCL offers thousands of defined classes and types to choose from
in building your programs. To help organize this array of available functionality, types with
related functionality are declared in the same namespace. The BCL uses more than 100
namespaces to organize its types.
Search WWH ::




Custom Search