XmlArrayItems Property

XmlAttributes.XmlArrayItems Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets or sets a collection of objects that specify how the XmlSerializer serializes items inserted into an array returned by a public field or read/write property.

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

public XmlArrayItemAttributes XmlArrayItems { get; }

Property Value

Type: System.Xml.Serialization.XmlArrayItemAttributes
An XmlArrayItemAttributes object that contains a collection of XmlArrayItemAttribute objects.

The XmlArrayItems property allows you to specify the derived types that can be inserted into an array returned by a public field or public read/write property. For each new type you want the field or property to accept, create an XmlArrayItemAttribute object and Add it to the XmlArrayItemAttributes returned by the XmlArrayItems property. (The new type must be derived from the type already accepted by the field or property.) Add the XmlAttributes object to an XmlAttributeOverrides object and specify the type of the object that contains the field or property, and the name of the field or property. Construct an XmlSerializer with the XmlAttributeOverrides object before calling Serialize or Deserialize method.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft