Gets a collection of objects that specify how the XmlSerializer serializes a public field or read/write property as an XML element.
Assembly: System.Xml (in System.Xml.dll)
The following example serializes the Transportation class, which contains a single field named Vehicles that returns an ArrayList. The example applies two XmlElementAttribute attributes to the Vehicles field. The example creates two XmlElementAttribute objects and adds them to the XmlElementAttributes collection of an XmlAttributes object. To allow the array to accept different object types, the XmlAttributes object is added to the XmlAttributeOverrides object.
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