แก้ไข

แชร์ผ่าน


SwitchExpressionException Constructors

Definition

Overloads

SwitchExpressionException()

Initializes a new instance of the SwitchExpressionException class.

SwitchExpressionException(Exception)

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)

Initializes a new instance of the SwitchExpressionException class with an unmatched switch value.

SwitchExpressionException(String)

Initializes a new instance of the SwitchExpressionException class with the specified message.

SwitchExpressionException(String, Exception)

Initializes a new instance of the SwitchExpressionException class with the specified detailed description and the specified exception.

SwitchExpressionException()

Source:
SwitchExpressionException.cs
Source:
SwitchExpressionException.cs
Source:
SwitchExpressionException.cs

Initializes a new instance of the SwitchExpressionException class.

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

Applies to

SwitchExpressionException(Exception)

Source:
SwitchExpressionException.cs
Source:
SwitchExpressionException.cs
Source:
SwitchExpressionException.cs

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);
public SwitchExpressionException (Exception innerException);
new System.Runtime.CompilerServices.SwitchExpressionException : Exception -> System.Runtime.CompilerServices.SwitchExpressionException
Public Sub New (innerException As Exception)

Parameters

innerException
Exception

The exception that is the cause of the current exception. If the innerException parameter is not null, the current exception is raised in a catch block that handles the inner exception.

Applies to

SwitchExpressionException(Object)

Source:
SwitchExpressionException.cs
Source:
SwitchExpressionException.cs
Source:
SwitchExpressionException.cs

Initializes a new instance of the SwitchExpressionException class with an unmatched switch value.

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)

Parameters

unmatchedValue
Object

The switch value that does not match any switch cases.

Applies to

SwitchExpressionException(String)

Source:
SwitchExpressionException.cs
Source:
SwitchExpressionException.cs
Source:
SwitchExpressionException.cs

Initializes a new instance of the SwitchExpressionException class with the specified message.

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)

Parameters

message
String

The message to display to the end user.

Applies to

SwitchExpressionException(String, Exception)

Source:
SwitchExpressionException.cs
Source:
SwitchExpressionException.cs
Source:
SwitchExpressionException.cs

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);
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)

Parameters

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.

Applies to