XmlElementAttribute Constructor (String)
Collapse the table of content
Expand the table of content

XmlElementAttribute Constructor (String)

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

Initializes a new instance of the XmlElementAttribute class and specifies the name of the XML element.

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

'Declaration
Public Sub New ( _
	elementName As String _
)

Parameters

elementName
Type: System.String
The XML element name of the serialized member.

By default, the XmlSerializer uses the member name as the XML element name when serializing a class instance. For example, a field named Vehicle generates an XML element named Vehicle. However, if you need a different element, such as Cars, pass it in the elementName parameter.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft