XmlSerializationWriter.CreateMismatchChoiceException(String, String, String) 方法
定义
创建一个 InvalidOperationException,该异常指示 XML 元素的某个值与枚举类型不匹配。Creates an InvalidOperationException that indicates that a value for an XML element does not match an enumeration type.
此 API 支持产品基础结构,不能在代码中直接使用。
protected:
Exception ^ CreateMismatchChoiceException(System::String ^ value, System::String ^ elementName, System::String ^ enumValue);
protected Exception CreateMismatchChoiceException (string value, string elementName, string enumValue);
member this.CreateMismatchChoiceException : string * string * string -> Exception
Protected Function CreateMismatchChoiceException (value As String, elementName As String, enumValue As String) As Exception
参数
- value
- String
无效的值。The value that is not valid.
- elementName
- String
具有无效值的 XML 元素的名称。The name of the XML element with an invalid value.
- enumValue
- String
有效值。The valid value.
返回
新创建的异常。The newly created exception.
注解
的受保护成员 XmlSerializationWriter 仅供在 .NET FRAMEWORK XML 序列化基础结构内部使用的派生类使用。The protected members of XmlSerializationWriter are intended for use only by derived classes that are used internally within the .NET Framework XML serialization infrastructure.