XmlSchemaException 建構函式

定義

將所有 XmlSchemaException 屬性串流到 SerializationInfo 給定 StreamingContext的類別中。

多載

名稱 Description
XmlSchemaException()

初始化 XmlSchemaException 類別的新執行個體。

XmlSchemaException(String)

初始化類別的新實例 XmlSchemaException ,並指定例外訊息。

XmlSchemaException(SerializationInfo, StreamingContext)
已淘汰.

構造 XmlSchemaException 一個包含 SerializationInfoStreamingContextXmlSchemaException所有屬性的資訊與新物件。

XmlSchemaException(String, Exception)

初始化該類別的新實例 XmlSchemaException ,並指定例外訊息及導致此例外的原始 Exception 物件。

XmlSchemaException(String, Exception, Int32, Int32)

初始化一個新的類別實例 XmlSchemaException ,並指定例外訊息,並指定導致此例外的原始 Exception 物件、行號與行位置。

XmlSchemaException()

來源:
XmlSchemaException.cs
來源:
XmlSchemaException.cs
來源:
XmlSchemaException.cs
來源:
XmlSchemaException.cs
來源:
XmlSchemaException.cs

初始化 XmlSchemaException 類別的新執行個體。

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

適用於

XmlSchemaException(String)

來源:
XmlSchemaException.cs
來源:
XmlSchemaException.cs
來源:
XmlSchemaException.cs
來源:
XmlSchemaException.cs
來源:
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)

來源:
XmlSchemaException.cs
來源:
XmlSchemaException.cs
來源:
XmlSchemaException.cs
來源:
XmlSchemaException.cs
來源:
XmlSchemaException.cs

警告

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

構造 XmlSchemaException 一個包含 SerializationInfoStreamingContextXmlSchemaException所有屬性的資訊與新物件。

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

序號資訊。

context
StreamingContext

串流上下文。

屬性

適用於

XmlSchemaException(String, Exception)

來源:
XmlSchemaException.cs
來源:
XmlSchemaException.cs
來源:
XmlSchemaException.cs
來源:
XmlSchemaException.cs
來源:
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)

來源:
XmlSchemaException.cs
來源:
XmlSchemaException.cs
來源:
XmlSchemaException.cs
來源:
XmlSchemaException.cs
來源:
XmlSchemaException.cs

初始化一個新的類別實例 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 行位。

適用於