-
Book Overview & Buying
-
Table Of Contents
Learn C# Programming
By :
We have mentioned namespaces several times in this book already without explaining what they really are. Namespaces are used to organize your code in logical units. A namespace defines a declaration space that contains types. This declaration space has a name that is part of a type's name. For instance, the .NET type String is declared in the System namespace. The complete name of the type is System.String. This is called the fully-qualified name of the type. Typically, we use only the unqualified name of the type (String, in this case), because we use using directives to bring declarations into the current scope from a particular namespace.
Namespaces are used for two main purposes: