XmlSchemaException 构造函数

定义

将所有 XmlSchemaException 属性流式传输到 SerializationInfo 给定 StreamingContext的类中。

重载

名称 说明
XmlSchemaException()

初始化 XmlSchemaException 类的新实例。

XmlSchemaException(String)

使用指定的异常消息初始化类的新实例 XmlSchemaException

XmlSchemaException(SerializationInfo, StreamingContext)
已过时.

使用给定XmlSchemaException对象和SerializationInfo包含所有属性StreamingContext的信息构造一个新XmlSchemaException对象。

XmlSchemaException(String, Exception)

使用异常消息和导致指定此异常的原始XmlSchemaException对象初始化类的新实例Exception

XmlSchemaException(String, Exception, Int32, Int32)

使用指定的异常消息以及导致指定此异常的 XML 的原始XmlSchemaException对象、行号和行位置初始化类的新实例Exception

XmlSchemaException()

Source:
XmlSchemaException.cs
Source:
XmlSchemaException.cs
Source:
XmlSchemaException.cs
Source:
XmlSchemaException.cs
Source:
XmlSchemaException.cs

初始化 XmlSchemaException 类的新实例。

public:
 XmlSchemaException();
public XmlSchemaException();
Public Sub New ()

适用于

XmlSchemaException(String)

Source:
XmlSchemaException.cs
Source:
XmlSchemaException.cs
Source:
XmlSchemaException.cs
Source:
XmlSchemaException.cs
Source:
XmlSchemaException.cs

使用指定的异常消息初始化类的新实例 XmlSchemaException

public:
 XmlSchemaException(System::String ^ message);
public XmlSchemaException(string? message);
public XmlSchemaException(string message);
new System.Xml.Schema.XmlSchemaException : string -> System.Xml.Schema.XmlSchemaException
Public Sub New (message As String)

参数

message
String

string错误条件的说明。

适用于

XmlSchemaException(SerializationInfo, StreamingContext)

Source:
XmlSchemaException.cs
Source:
XmlSchemaException.cs
Source:
XmlSchemaException.cs
Source:
XmlSchemaException.cs
Source:
XmlSchemaException.cs

注意

This API supports obsolete formatter-based serialization. It should not be called or extended by application code.

使用给定XmlSchemaException对象和SerializationInfo包含所有属性StreamingContext的信息构造一个新XmlSchemaException对象。

protected:
 XmlSchemaException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
[System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
protected XmlSchemaException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
protected XmlSchemaException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
[<System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Xml.Schema.XmlSchemaException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Xml.Schema.XmlSchemaException
new System.Xml.Schema.XmlSchemaException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Xml.Schema.XmlSchemaException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

参数

info
SerializationInfo

SerializationInfo。

context
StreamingContext

StreamingContext。

属性

适用于

XmlSchemaException(String, Exception)

Source:
XmlSchemaException.cs
Source:
XmlSchemaException.cs
Source:
XmlSchemaException.cs
Source:
XmlSchemaException.cs
Source:
XmlSchemaException.cs

使用异常消息和导致指定此异常的原始XmlSchemaException对象初始化类的新实例Exception

public:
 XmlSchemaException(System::String ^ message, Exception ^ innerException);
public XmlSchemaException(string? message, Exception? innerException);
public XmlSchemaException(string message, Exception innerException);
new System.Xml.Schema.XmlSchemaException : string * Exception -> System.Xml.Schema.XmlSchemaException
Public Sub New (message As String, innerException As Exception)

参数

message
String

string错误条件的说明。

innerException
Exception

导致此异常的原始 Exception 对象。

适用于

XmlSchemaException(String, Exception, Int32, Int32)

Source:
XmlSchemaException.cs
Source:
XmlSchemaException.cs
Source:
XmlSchemaException.cs
Source:
XmlSchemaException.cs
Source:
XmlSchemaException.cs

使用指定的异常消息以及导致指定此异常的 XML 的原始XmlSchemaException对象、行号和行位置初始化类的新实例Exception

public:
 XmlSchemaException(System::String ^ message, Exception ^ innerException, int lineNumber, int linePosition);
public XmlSchemaException(string? message, Exception? innerException, int lineNumber, int linePosition);
public XmlSchemaException(string message, Exception innerException, int lineNumber, int linePosition);
new System.Xml.Schema.XmlSchemaException : string * Exception * int * int -> System.Xml.Schema.XmlSchemaException
Public Sub New (message As String, innerException As Exception, lineNumber As Integer, linePosition As Integer)

参数

message
String

string错误条件的说明。

innerException
Exception

导致此异常的原始 Exception 对象。

lineNumber
Int32

导致此异常的 XML 的行号。

linePosition
Int32

导致此异常的 XML 的行位置。

适用于