XmlTypeAttribute.Namespace Property


Gets or sets the namespace of the XML type.

Namespace:   System.Xml.Serialization
Assembly:  System.Xml (in System.Xml.dll)

public string Namespace { get; set; }

Property Value

Type: System.String

The namespace of the XML type.

The following example applies the XmlTypeAttribute to a class while setting the Namespace property.

[XmlType(Namespace = "http://www.cpandl.com")]
public class Book
   // Insert members for the class.

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top