class SwitchExpressionException
in global :: System . Runtime . CompilerServices
Indicates that a switch expression that was non-exhaustive failed to match its input at runtime. The exception optionally contains an object representing the unmatched value.
public SwitchExpressionException( Exception innerException )
Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception.
innerExceptionThe exception that is the cause of the current exception. If the parameter is not , the current exception is raised in a block that handles the inner exception.
public SwitchExpressionException( object unmatchedValue )
Initializes a new instance of the class with an unmatched switch value.
unmatchedValueThe switch value that does not match any switch cases.
public SwitchExpressionException( string message )
Initializes a new instance of the class with the specified message.
messageThe message to display to the end user.
public SwitchExpressionException( string message, Exception innerException )
Initializes a new instance of the class with the specified detailed description and the specified exception.
messageThe message to display to the end user.innerExceptionA reference to the inner exception that is the cause of this exception.
public void GetObjectData( SerializationInfo info, StreamingContext context )
Sets the with the parameter name and additional exception information.
infoStores the data that was being used to serialize or deserialize the object that the was serializing or deserializing.contextDescribes the source and destination of the stream that generated the exception, as well as a means for serialization to retain that context and an additional caller-defined context.
public object UnmatchedValue { get; }
Gets the unmatched value associated with the exception.
- Returns The unmatched value causing the exception.
public string HelpLink { get; set; }
😔 No documentation found.
public string Source { get; set; }
😔 No documentation found.
public string ToString( )
😔 No documentation found.
public Exception GetBaseException( )
😔 No documentation found.
public Type GetType( )
😔 No documentation found.
public string StackTrace { get; }
😔 No documentation found.
public Type GetType( )
😔 No documentation found.
public bool Equals( object obj )
😔 No documentation found.
public int GetHashCode( )
😔 No documentation found.
public SwitchExpressionException( )
😔 No documentation found.
public IDictionary Data { get; }
😔 No documentation found.
public string Message { get; }
😔 No documentation found.
public Exception InnerException { get; }
😔 No documentation found.
public int HResult { get; set; }
😔 No documentation found.