Export (0) Print
Expand All

SoapAttributes.SoapEnum Property

Gets or sets an object that specifies how the XmlSerializer serializes a SOAP enumeration.

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

member SoapEnum : SoapEnumAttribute with get, set

Property Value

Type: System.Xml.Serialization.SoapEnumAttribute
An object that specifies how the XmlSerializer serializes an enumeration member.

The SoapEnumAttribute is used to control the serialization of an enumeration member. Set the SoapEnum property to a new SoapEnumAttribute to override the serialization of such a member.

For more information, see the SoapAttributeOverrides class overview.

The following example serializes two classes named Food and FoodType. The FoodType class contains two enumerations that are overridden, and for each enumeration, the example creates a SoapEnumAttribute that it assigns to the SoapEnum property of a SoapAttributes. The example then adds the SoapAttributes to a SoapAttributeOverrides, which is used to create an XmlSerializer.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

XNA Framework

Supported in: 3.0, 2.0, 1.0
Show:
© 2015 Microsoft