Specifies that the member (a field that returns an array of System.Xml.XmlAttribute objects) can contain any XML attributes.
See Also: XmlAnyAttributeAttribute Members
Use the System.Xml.Serialization.XmlAnyAttributeAttribute to contain arbitrary data (as XML attributes) that is sent as part of an XML document, such as, metadata sent as part of the document.
Apply the System.Xml.Serialization.XmlAnyAttributeAttribute to a field that returns an array of System.Xml.XmlAttribute or System.Xml.XmlNode objects. When the XmlSerializer.Deserialize(System.IO.Stream) method of the System.Xml.Serialization.XmlSerializer class is called, all XML attributes that do not have a corresponding member in the class being deserialized are collected in the array. After deserialization, you can iterate through the collection of System.Xml.XmlAttribute items to process the data.
The XmlSerializer.UnknownNode and XmlSerializer.UnknownAttribute events of the System.Xml.Serialization.XmlSerializer do not occur if you apply the System.Xml.Serialization.XmlAnyAttributeAttribute to a member of a class.
You can use the word XmlAnyAttribute in your code instead of the longer System.Xml.Serialization.XmlAnyAttributeAttribute.
For more information about using attributes, see Extending Metadata Using Attributes.