NamespaceInfo(String) Constructor

Definition

Initializes a new instance of the NamespaceInfo class with the specified namespace reference.

C#
public NamespaceInfo(string name);

Parameters

name
String

A namespace reference for the new NamespaceInfo object.

Examples

The following code example shows how to use NamespaceInfo constructor. It is part of a larger example for the PagesSection type.

C#
// Add a NamespaceInfo object using a constructor.
pagesSection.Namespaces.Add(
    new System.Web.Configuration.NamespaceInfo(
    "System.Collections.Specialized"));

Remarks

No validation is performed to verify that the namespace reference is valid.

Applies to

Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also