SwitchExpressionException 建構函式

定義

多載

SwitchExpressionException()

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

SwitchExpressionException(Exception)

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

SwitchExpressionException(Object)

使用不相符的參數值,初始化 SwitchExpressionException 類別的新執行個體。

SwitchExpressionException(String)

使用指定的訊息初始化 SwitchExpressionException 類別的新執行個體。

SwitchExpressionException(String, Exception)

使用指定的詳細描述和指定的例外狀況,初始化 SwitchExpressionException 類別的新執行個體。

SwitchExpressionException()

來源:
SwitchExpressionException.cs
來源:
SwitchExpressionException.cs
來源:
SwitchExpressionException.cs

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

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

適用於

SwitchExpressionException(Exception)

來源:
SwitchExpressionException.cs
來源:
SwitchExpressionException.cs
來源:
SwitchExpressionException.cs

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

public:
 SwitchExpressionException(Exception ^ innerException);
public SwitchExpressionException (Exception? innerException);
public SwitchExpressionException (Exception innerException);
new System.Runtime.CompilerServices.SwitchExpressionException : Exception -> System.Runtime.CompilerServices.SwitchExpressionException
Public Sub New (innerException As Exception)

參數

innerException
Exception

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

適用於

SwitchExpressionException(Object)

來源:
SwitchExpressionException.cs
來源:
SwitchExpressionException.cs
來源:
SwitchExpressionException.cs

使用不相符的參數值,初始化 SwitchExpressionException 類別的新執行個體。

public:
 SwitchExpressionException(System::Object ^ unmatchedValue);
public SwitchExpressionException (object? unmatchedValue);
public SwitchExpressionException (object unmatchedValue);
new System.Runtime.CompilerServices.SwitchExpressionException : obj -> System.Runtime.CompilerServices.SwitchExpressionException
Public Sub New (unmatchedValue As Object)

參數

unmatchedValue
Object

不符合任何參數案例的參數值。

適用於

SwitchExpressionException(String)

來源:
SwitchExpressionException.cs
來源:
SwitchExpressionException.cs
來源:
SwitchExpressionException.cs

使用指定的訊息初始化 SwitchExpressionException 類別的新執行個體。

public:
 SwitchExpressionException(System::String ^ message);
public SwitchExpressionException (string? message);
public SwitchExpressionException (string message);
new System.Runtime.CompilerServices.SwitchExpressionException : string -> System.Runtime.CompilerServices.SwitchExpressionException
Public Sub New (message As String)

參數

message
String

對使用者顯示的訊息。

適用於

SwitchExpressionException(String, Exception)

來源:
SwitchExpressionException.cs
來源:
SwitchExpressionException.cs
來源:
SwitchExpressionException.cs

使用指定的詳細描述和指定的例外狀況,初始化 SwitchExpressionException 類別的新執行個體。

public:
 SwitchExpressionException(System::String ^ message, Exception ^ innerException);
public SwitchExpressionException (string? message, Exception? innerException);
public SwitchExpressionException (string message, Exception innerException);
new System.Runtime.CompilerServices.SwitchExpressionException : string * Exception -> System.Runtime.CompilerServices.SwitchExpressionException
Public Sub New (message As String, innerException As Exception)

參數

message
String

對使用者顯示的訊息。

innerException
Exception

造成這個例外狀況之內部例外狀況的參考。

適用於