ElementName Property
Collapse the table of content
Expand the table of content

XmlArrayAttribute.ElementName Property

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

Gets or sets the XML element name given to the serialized array.

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

public string ElementName { get; set; }

Property Value

Type: System.String
The XML element name of the serialized array. The default is the name of the member to which the XmlArrayAttribute is assigned.

Specify an ElementName when you want the generated XML element name to differ from the member's identifier.

You can set the same ElementName value to more than one member as long as the generated XML document uses XML namespaces to distinguish between the identically named members.

For more information about

using namespaces and creating prefixed names in the XML document, see XmlSerializerNamespaces.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2016 Microsoft