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.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2