Partager via


XmlAttributes.XmlElements Property

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

Gets a collection of objects that specify how the XmlSerializer serializes a public field or read/write property as an XML element.

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

Syntax

'Declaration
Public ReadOnly Property XmlElements As XmlElementAttributes
public XmlElementAttributes XmlElements { get; }

Property Value

Type: System.Xml.Serialization.XmlElementAttributes
An XmlElementAttributes that contains a collection of XmlElementAttribute objects.

Remarks

For each overridden member that is serialized as an XML element, you must add a new XmlElementAttribute to an XmlElementAttributes by calling the Add method. By default, an XmlElementAttributes object is created and assigned to the XmlElements property.

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.