Type::Namespace Property

Gets the namespace of the Type.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

No code example is currently available or this language may not be supported.

Property Value

Type: System::String
The namespace of the Type; nullptr if the current instance has no namespace, or represents a generic parameter.

A namespace is a logical design-time naming convenience, used mainly to define scope in an application and organize classes and other types in a single hierarchical structure. From the viewpoint of the runtime, there are no namespaces.

If the current Type represents a constructed generic type, this property returns the namespace that contains the generic type definition. Similarly, if the current Type represents a generic parameter T, this property returns the namespace that contains the generic type definition that defines T.

If the current Type object represents a generic parameter, this property returns nullptr.

This following example demonstrates a use of the Namespace and Module properties and the ToString method of Type.

No code example is currently available or this language may not be supported.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show: