SwitchExpressionException 建構函式

定義

多載

SwitchExpressionException()

初始化 SwitchExpressionException 類別的新執行個體。Initializes a new instance of the SwitchExpressionException class.

SwitchExpressionException(Exception)

使用指定的錯誤訊息以及造成此例外狀況的內部例外狀況的參考,初始化 SwitchExpressionException 類別的新執行個體。Initializes a new instance of the SwitchExpressionException class with a specified error message and a reference to the inner exception that is the cause of this exception.

SwitchExpressionException(Object)

使用不相符的參數值,初始化 SwitchExpressionException 類別的新執行個體。Initializes a new instance of the SwitchExpressionException class with an unmatched switch value.

SwitchExpressionException(String)

使用指定的訊息初始化 SwitchExpressionException 類別的新執行個體。Initializes a new instance of the SwitchExpressionException class with the specified message.

SwitchExpressionException(String, Exception)

使用指定的詳細描述和指定的例外狀況,初始化 SwitchExpressionException 類別的新執行個體。Initializes a new instance of the SwitchExpressionException class with the specified detailed description and the specified exception.

SwitchExpressionException()

初始化 SwitchExpressionException 類別的新執行個體。Initializes a new instance of the SwitchExpressionException class.

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

SwitchExpressionException(Exception)

使用指定的錯誤訊息以及造成此例外狀況的內部例外狀況的參考,初始化 SwitchExpressionException 類別的新執行個體。Initializes a new instance of the SwitchExpressionException class with a specified error message and a reference to the inner exception that is the cause of this exception.

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

造成目前例外狀況的例外狀況。The exception that is the cause of the current exception. 如果 innerException 參數不是 null,則目前的例外狀況會在處理內部例外的 catch 區塊中引發。If the innerException parameter is not null, the current exception is raised in a catch block that handles the inner exception.

SwitchExpressionException(Object)

使用不相符的參數值,初始化 SwitchExpressionException 類別的新執行個體。Initializes a new instance of the SwitchExpressionException class with an unmatched switch value.

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

參數

unmatchedValue
Object

不符合任何參數案例的參數值。The switch value that does not match any switch cases.

SwitchExpressionException(String)

使用指定的訊息初始化 SwitchExpressionException 類別的新執行個體。Initializes a new instance of the SwitchExpressionException class with the specified message.

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

參數

message
String

對使用者顯示的訊息。The message to display to the end user.

SwitchExpressionException(String, Exception)

使用指定的詳細描述和指定的例外狀況,初始化 SwitchExpressionException 類別的新執行個體。Initializes a new instance of the SwitchExpressionException class with the specified detailed description and the specified exception.

public:
 SwitchExpressionException(System::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

對使用者顯示的訊息。The message to display to the end user.

innerException
Exception

導致此例外狀況發生的內部例外狀況參考。A reference to the inner exception that is the cause of this exception.

適用於