次の方法で共有


XmlArrayItemAttribute.Type Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets or sets the type allowed in an array.

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

Syntax

'Declaration
Public Property Type As Type
public Type Type { get; set; }

Property Value

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

Remarks

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

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.