TargetParameterCountException 建構函式

定義

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

多載

名稱 Description
TargetParameterCountException()

初始化一個新的類別實例 TargetParameterCountException ,包含空訊息字串及例外的根本原因。

TargetParameterCountException(String)

初始化一個新的類別實例 TargetParameterCountException ,其訊息字串設定為該訊息及根因例外。

TargetParameterCountException(String, Exception)

初始化類別的新實例 TargetParameterCountException ,並附上指定的錯誤訊息及導致該異常的內部例外的參考。

TargetParameterCountException()

初始化一個新的類別實例 TargetParameterCountException ,包含空訊息字串及例外的根本原因。

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

備註

TargetParameterCountException 繼承自 Exception。 此建構子設定 Exception 物件的屬性,如下表所示。

房產 Value
InnerException null
Message 空字串(“”)。

適用於

TargetParameterCountException(String)

初始化一個新的類別實例 TargetParameterCountException ,其訊息字串設定為該訊息及根因例外。

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

參數

message
String

String說明了這個例外被拋棄的原因。

備註

TargetParameterCountException 繼承自 Exception。 此建構器設定物件的 Exception 屬性如下表所示。

房產 Value
InnerException null
Message 訊息字串。

適用於

TargetParameterCountException(String, Exception)

初始化類別的新實例 TargetParameterCountException ,並附上指定的錯誤訊息及導致該異常的內部例外的參考。

public:
 TargetParameterCountException(System::String ^ message, Exception ^ inner);
public TargetParameterCountException(string message, Exception inner);
new System.Reflection.TargetParameterCountException : string * Exception -> System.Reflection.TargetParameterCountException
Public Sub New (message As String, inner As Exception)

參數

message
String

說明例外狀況原因的錯誤訊息。

inner
Exception

該例外即為當前例外的原因。 若 inner 參數不 null為 ,則在處理內部異常的區塊中提出 catch 當前例外。

備註

因先前例外直接拋出的例外,應包含對該屬性中 InnerException 先前例外的參考。 該 InnerException 屬性回傳與傳入建構子相同的值,或 null 若該 InnerException 性質未提供內部例外值給建構子。

下表顯示了 的 TargetParameterCountException初始屬性值。

房產 Value
InnerException 內部例外的參考。
Message 錯誤訊息字串。

另請參閱

適用於