XmlSchemaException 建構函式

定義

將所有 XmlSchemaException 屬性資料流至指定之 SerializationInfoStreamingContext 類別。

多載

XmlSchemaException()

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

XmlSchemaException(String)

使用指定的例外狀況訊息,初始化 XmlSchemaException 類別的新執行個體。

XmlSchemaException(SerializationInfo, StreamingContext)
已淘汰.

以指定的 XmlSchemaExceptionSerializationInfo 資訊建構包含 StreamingContext 所有屬性的新 XmlSchemaException 物件。

XmlSchemaException(String, Exception)

使用例外狀況訊息和導致這個指定之例外狀況的原始 XmlSchemaException 物件,初始化 Exception 類別的新執行個體。

XmlSchemaException(String, Exception, Int32, Int32)

使用指定的例外狀況訊息,以及導致這個指定之例外狀況的原始 XmlSchemaException 物件、XML 中的行號和行位置,初始化 Exception 類別的新執行個體。

XmlSchemaException()

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

使用指定的例外狀況訊息,初始化 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

警告

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

以指定的 XmlSchemaExceptionSerializationInfo 資訊建構包含 StreamingContext 所有屬性的新 XmlSchemaException 物件。

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}")]
protected XmlSchemaException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.Xml.Schema.XmlSchemaException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Xml.Schema.XmlSchemaException
[<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
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

使用例外狀況訊息和導致這個指定之例外狀況的原始 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

使用指定的例外狀況訊息,以及導致這個指定之例外狀況的原始 XmlSchemaException 物件、XML 中的行號和行位置,初始化 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 行位置。

適用於