語言

NamespaceInfo.Namespace 屬性

定義

取得或設定命名空間的參考。

public:
 property System::String ^ Namespace { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("namespace", DefaultValue="", IsKey=true, IsRequired=true)]
[System.Configuration.StringValidator(MinLength=1)]
public string Namespace { get; set; }
[<System.Configuration.ConfigurationProperty("namespace", DefaultValue="", IsKey=true, IsRequired=true)>]
[<System.Configuration.StringValidator(MinLength=1)>]
member this.Namespace : string with get, set
Public Property Namespace As String

屬性值

一個用來指定命名空間名稱的字串。

屬性

範例

以下程式碼範例說明如何使用該 Namespace 屬性。 此程式碼範例是本類別更大範例 PagesSection 的一部分。

// Set the Namespace property.
namespaceInfo.Namespace = "System.Collections";
' Set the Namespace property.
namespaceInfo.Namespace = "System.Collections"

備註

不會進行驗證來驗證命名空間引用的有效性。

適用於

另請參閱