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.
Assembly: System.Xml (in System.Xml.dll)
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.