XmlEnumAttribute Constructor (String^)
.NET Framework (current version)
Initializes a new instance of the XmlEnumAttribute class, and specifies the XML value that the XmlSerializer generates or recognizes (when it serializes or deserializes the enumeration, respectively).
Assembly: System.Xml (in System.Xml.dll)
Parameters
- name
-
Type:
System::String^
The overriding name of the enumeration member.
Note |
|---|
You can use the word XmlEnum in your code instead of the longer XmlEnumAttribute. |
The following example applies the XmlEnumAttribute to the members of an enumeration. When the XmlSerializer generates XML data for this enumeration, the data conforms to the values of the Name properties.
Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Show:
