Condividi tramite


XmlAttributes.XmlEnum Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets or sets an object that specifies how the XmlSerializer serializes an enumeration member.

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

Syntax

'Declaration
Public Property XmlEnum As XmlEnumAttribute
public XmlEnumAttribute XmlEnum { get; set; }

Property Value

Type: System.Xml.Serialization.XmlEnumAttribute
An XmlEnumAttribute that specifies how the XmlSerializer serializes an enumeration member.

Remarks

For each identifier you want to override, you must create an XmlAttributes object and set the XmlEnum property to an XmlEnumAttribute that overrides the identifier. Add the XmlAttributes object to the XmlAttributeOverrides object and specify both the Type of the class that contains the enumeration and the overridden member name.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.