[Previous] [Contents] [Next]

Namespaces

Namespaces are used to define scope in C# applications. By declaring a namespace, an application developer can give a C# application a hierarchical structure based on semantically related groups of types and other (nested) namespaces. Multiple source code files can contribute to the same namespace. To that extent, if you're packaging several classes in a given namespace, you can define each of these classes in its own source code file. A programmer employing your classes can get access to all the classes within a namespace through the using keyword.

NOTE
It is recommended that, where applicable, a company name be used as the name of the root namespace to help ensure uniqueness. See Chapter 3, "Hello, C#," for more on naming guidelines.

[Previous] [Contents] [Next]