共用方式為


XmlTypeAttribute.Namespace 屬性

定義

取得或設定 XML 型別的命名空間。

public:
 property System::String ^ Namespace { System::String ^ get(); void set(System::String ^ value); };
public string Namespace { get; set; }
public string? Namespace { get; set; }
member this.Namespace : string with get, set
Public Property Namespace As String

屬性值

XML 型別的命名空間。

範例

以下範例將 應用 XmlTypeAttribute 於設定屬性的 Namespace 類別。

[XmlType(Namespace = "http://www.cpandl.com")]
public class Book
{
   // Insert members for the class.
}
<XmlType(Namespace := "http://www.cpandl.com")> _
Public Class Book
    ' Insert members for the class.
End Class

適用於