System.Xml.Serialization.XmlArrayItemAttributes Class

Represents a collection of System.Xml.Serialization.XmlArrayItemAttribute objects.

See Also: XmlArrayItemAttributes Members

Syntax

public class XmlArrayItemAttributes : CollectionBase

Remarks

The System.Xml.Serialization.XmlArrayItemAttributes class allows you to specify the derived types that can be inserted into an array returned by a public field or public read/write property.

An instance of this class is returned by the XmlAttributes.XmlArrayItems property of the System.Xml.Serialization.XmlAttributes class. The System.Xml.Serialization.XmlAttributes class is used when overriding the set of System.Xml.Serialization.XmlArrayItemAttribute objects that can be inserted into an array to which the System.Xml.Serialization.XmlArrayAttribute has been applied.

For each new type you want the field or property to accept, create an System.Xml.Serialization.XmlArrayItemAttribute and use the XmlArrayItemAttributes.Add(XmlArrayItemAttribute) to add the object to the System.Xml.Serialization.XmlArrayItemAttributes collection returned by the XmlAttributes.XmlArrayItems property. XmlAttributeOverrides.Add(Type, XmlAttributes) the System.Xml.Serialization.XmlAttributes to an System.Xml.Serialization.XmlAttributeOverrides, that specifies the type of the object that contains the field or property, and the name of the field or property. Construct an System.Xml.Serialization.XmlSerializer with the System.Xml.Serialization.XmlAttributeOverrides before calling the XmlSerializer.Serialize(System.IO.TextWriter, object) or XmlSerializer.Deserialize(System.IO.Stream) method.

Requirements

Namespace: System.Xml.Serialization
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0