Gets or sets an object that specifies how the XmlSerializer serializes an enumeration member.
Assembly: System.Xml (in System.Xml.dll)
For each identifier you want to override, you must create an XmlAttributes object, and set the 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.
The following example serializes two classes named Food and FoodType. The FoodType class contains two enumerations that are overridden and, for each enumeration, the example creates an XmlEnumAttribute object that it assigns to the property of an XmlAttributes object. The example then adds the XmlAttributes object to an XmlAttributeOverrides object, which is used to create an XmlSerializer.
Available since 8
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Available since 8.1