XmlType Property

XmlAttributes.XmlType Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets or sets an object that specifies how the XmlSerializer serializes a class to which the XmlTypeAttribute has been applied.

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

'Declaration
Public Property XmlType As XmlTypeAttribute

Property Value

Type: System.Xml.Serialization.XmlTypeAttribute
An XmlTypeAttribute that overrides an XmlTypeAttribute applied to a class declaration.

The XmlTypeAttribute can be used to control how a type is serialized by the XmlSerializer. For example, by default, when a type is serialized, the XmlSerializer uses the class name as the XML element name. By creating an XmlTypeAttribute, setting the XmlType property to it, and creating an XmlAttributeOverrides object, you can change the XML element name.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft