This documentation is archived and is not being maintained.

XmlArrayItemAttributes Class

Represents a collection of XmlArrayItemAttribute objects.

For a list of all members of this type, see XmlArrayItemAttributes Members.


[Visual Basic]
Public Class XmlArrayItemAttributes
   Inherits CollectionBase
public class XmlArrayItemAttributes : CollectionBase
public __gc class XmlArrayItemAttributes : public CollectionBase
public class XmlArrayItemAttributes extends CollectionBase

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


The 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 XmlArrayItems property of the XmlAttributes class. The XmlAttributes class is used when overriding the set of XmlArrayItemAttribute objects that can be inserted into an array to which the XmlArrayAttribute has been applied.

For each new type you want the field or property to accept, create an XmlArrayItemAttribute and use the Add to to add the object to the XmlArrayItemAttributes collection returned by the XmlArrayItems property. Add the XmlAttributes to an XmlAttributeOverrides, specifying the type of the object containing the field or property, and the name of the field or property. Construct an XmlSerializer with the XmlAttributeOverrides before calling the Serialize or Deserialize method.


Namespace: System.Xml.Serialization

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: System.Xml (in System.Xml.dll)

See Also

XmlArrayItemAttributes Members | System.Xml.Serialization Namespace | XmlSerializer | XmlAttributeOverrides