string Namespace

book_4_sparkGenerated
code_blocksInput

Description

The Namespace field of the DisplayInfo struct represents the namespace of the type or member it describes. This field is a string and is publicly accessible, allowing you to retrieve the namespace information for the associated type or member.

Usage

To access the Namespace field, you need an instance of the DisplayInfo struct. This field is useful when you need to programmatically determine or display the namespace of a type or member within the Sandbox environment.

Example

// Example of accessing the Namespace field
DisplayInfo displayInfo = DisplayInfo.ForType(typeof(MyClass));
string namespaceName = displayInfo.Namespace;

// Output the namespace
// Assume MyClass is in the namespace 'MyNamespace'
// namespaceName would be "MyNamespace"