XmlArrayItemAttribute.Type Property

July 28, 2014

Gets or sets the type allowed in an array.

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

public Type Type { get; set; }

Property Value

Type: System.Type
A Type that is allowed in the array.

Use the Type property to specify an overridden type for a public field or public read/write property value.

If a field or property returns an array of type Object, apply multiple instances of the XmlArrayItemAttribute to the field or property. For each instance, set the Type property to a type of object that can be inserted into the array.

If an array contains only primitive types, you do not need to apply the XmlArrayItemAttribute. By default, the XmlSerializer generates a series of elements, each with the same element name, for each value, but the type of each element is set to the XML Schema data type.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

© 2014 Microsoft