XmlArrayItemAttribute.Type Property

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

Gets or sets the type allowed in an array.

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


Public Property Type As Type
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.

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0


Windows Phone

See Also


XmlArrayItemAttribute Class

System.Xml.Serialization Namespace