System.Xml.Serialization.XmlSerializationWriter.CreateMismatchChoiceException Method

Creates an InvalidOperationException that indicates that a value for an XML element does not match an enumeration type.

Syntax

protected Exception CreateMismatchChoiceException (string value, string elementName, string enumValue)

Parameters

value
The value that is not valid.
elementName
The name of the XML element with an invalid value.
enumValue
The valid value.

Returns

The newly created exception.

Remarks

The protected members of System.Xml.Serialization.XmlSerializationWriter are intended for use only by derived classes that are used internally within the .NET Framework XML serialization infrastructure.

Requirements

Namespace: System.Xml.Serialization
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0