XmlTypeAttribute.Namespace-Eigenschaft
Ruft den Namespace des XML-Typs ab oder legt diesen fest.
Namespace: System.Xml.Serialization
Assembly: System.Xml (in system.xml.dll)
Syntax
'Declaration
Public Property Namespace As String
'Usage
Dim instance As XmlTypeAttribute
Dim value As String
value = instance.Namespace
instance.Namespace = value
public string Namespace { get; set; }
public:
property String^ Namespace {
String^ get ();
void set (String^ value);
}
/** @property */
public String get_Namespace ()
/** @property */
public void set_Namespace (String value)
public function get Namespace () : String
public function set Namespace (value : String)
Eigenschaftenwert
Der Namespace des XML-Typs.
Beispiel
Im folgenden Beispiel wird XmlTypeAttribute auf eine Klasse angewendet, wobei die Namespace-Eigenschaft festgelegt wird.
<XmlType(Namespace := "http://www.cpandl.com")> _
Public Class Book
' Insert members for the class.
End Class
[XmlType(Namespace = "http://www.cpandl.com")]
public class Book
{
// Insert members for the class.
}
[XmlType(Namespace="http://www.cpandl.com")]
public ref class Book{};
/** @attribute XmlType(Namespace = "http://www.cpandl.com")
*/
public class Book
{
// Insert members for the class.
} //Book
Plattformen
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile für Pocket PC, Windows Mobile für Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.
Versionsinformationen
.NET Framework
Unterstützt in: 2.0, 1.1, 1.0
.NET Compact Framework
Unterstützt in: 2.0, 1.0
Siehe auch
Referenz
XmlTypeAttribute-Klasse
XmlTypeAttribute-Member
System.Xml.Serialization-Namespace