XamlException 建構函式

定義

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

多載

XamlException()

初始化 XamlException 類別的新執行個體。 此執行個體包含描述錯誤、系統提供的訊息。

XamlException(String)

初始化 XamlException 類別的新執行個體。 此執行個體包含描述錯誤的指定訊息。

XamlException(SerializationInfo, StreamingContext)

使用序列化資料,初始化 XamlException 類別的新執行個體。

XamlException(String, Exception)

初始化 XamlException 類別的新執行個體。 此執行個體包含指定的錯誤訊息,以及造成此例外狀況之內部例外狀況的參考。

XamlException(String, Exception, Int32, Int32)

初始化 XamlException 類別的新執行個體。 此執行個體包含指定的錯誤訊息、內部例外狀況和行資訊。

XamlException()

初始化 XamlException 類別的新執行個體。 此執行個體包含描述錯誤、系統提供的訊息。

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

適用於

XamlException(String)

初始化 XamlException 類別的新執行個體。 此執行個體包含描述錯誤的指定訊息。

public:
 XamlException(System::String ^ message);
public XamlException (string message);
new System.Xaml.XamlException : string -> System.Xaml.XamlException
Public Sub New (message As String)

參數

message
String

說明例外狀況的訊息。 這個建構函式的呼叫端必須確保這個字串已針對目前系統的文化特性當地語系化。

適用於

XamlException(SerializationInfo, StreamingContext)

使用序列化資料,初始化 XamlException 類別的新執行個體。

protected:
 XamlException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected XamlException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.Xaml.XamlException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Xaml.XamlException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

參數

info
SerializationInfo

存放序列物件資料的物件。

context
StreamingContext

關於來源或目的端的內容資訊。

例外狀況

infonull

適用於

XamlException(String, Exception)

初始化 XamlException 類別的新執行個體。 此執行個體包含指定的錯誤訊息,以及造成此例外狀況之內部例外狀況的參考。

public:
 XamlException(System::String ^ message, Exception ^ innerException);
public XamlException (string message, Exception innerException);
new System.Xaml.XamlException : string * Exception -> System.Xaml.XamlException
Public Sub New (message As String, innerException As Exception)

參數

message
String

說明例外狀況的訊息。 這個建構函式的呼叫端必須確保這個字串已針對目前系統的文化特性當地語系化。

innerException
Exception

做為目前例外狀況發生原因的例外狀況。 如果 innerException 參數不是 null,則目前的例外狀況會在處理內部例外的 catch 區塊中引發。

備註

因為先前的例外狀況應該在 屬性中包含上一個例外狀況的參考,所以擲回的 InnerException 例外狀況。 屬性 InnerException 會傳回傳遞至建構函式的相同值;如果 InnerException 屬性未提供內部例外狀況值給建構函式,則會傳回 null

適用於

XamlException(String, Exception, Int32, Int32)

初始化 XamlException 類別的新執行個體。 此執行個體包含指定的錯誤訊息、內部例外狀況和行資訊。

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

參數

message
String

說明例外狀況的訊息。 這個建構函式的呼叫端必須確保這個字串已針對目前系統的文化特性當地語系化。

innerException
Exception

做為目前例外狀況發生原因的例外狀況。

lineNumber
Int32

要向偵錯或行資訊消費者報告的行號。

linePosition
Int32

要向偵錯或行資訊消費者報告的行位置。

適用於