Partager via


XmlElementAttribute.Type Property

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

Gets or sets the object type used to represent the XML element.

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
The Type of the member.

Remarks

Use the Type property to specify a derived type for a field or property.

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

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.