Exceptions

Remarks

Use the registerNamespace method to create a namespace. A namespace is a region of scope that enables you to organize code. This is especially useful in large projects. By using namespaces, you can group classes. Each class name is then qualified by its namespace, which gives you a way to create globally unique class names.

Within a namespace, you can declare one or more of the following classes:

Another namespace

A class

An interface

An enumeration

A delegate

A fully qualified class name includes its namespace delimited with the . (dot) operator, such as MyNamespace.MyType. A namespace name can include upper or lowercase letters in the range A–Z and integers in the range of 0-9.

Example

The following example shows how to use the registerNamespace method to register the namespace Samples.