NamespaceInfo.Namespace 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定命名空間的參考。
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"
備註
不會進行驗證來驗證命名空間引用的有效性。