InvalidEnumArgumentException InvalidEnumArgumentException InvalidEnumArgumentException InvalidEnumArgumentException Constructors

Definition

Overloads

InvalidEnumArgumentException() InvalidEnumArgumentException() InvalidEnumArgumentException()

Initializes a new instance of the InvalidEnumArgumentException class without a message.

InvalidEnumArgumentException(String) InvalidEnumArgumentException(String) InvalidEnumArgumentException(String) InvalidEnumArgumentException(String)

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

InvalidEnumArgumentException(SerializationInfo, StreamingContext) InvalidEnumArgumentException(SerializationInfo, StreamingContext) InvalidEnumArgumentException(SerializationInfo, StreamingContext) InvalidEnumArgumentException(SerializationInfo, StreamingContext)

Initializes a new instance of the InvalidEnumArgumentException class using the specified serialization data and context.

InvalidEnumArgumentException(String, Exception) InvalidEnumArgumentException(String, Exception) InvalidEnumArgumentException(String, Exception) InvalidEnumArgumentException(String, Exception)

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

InvalidEnumArgumentException(String, Int32, Type) InvalidEnumArgumentException(String, Int32, Type) InvalidEnumArgumentException(String, Int32, Type) InvalidEnumArgumentException(String, Int32, Type)

Initializes a new instance of the InvalidEnumArgumentException class with a message generated from the argument, the invalid value, and an enumeration class.

InvalidEnumArgumentException() InvalidEnumArgumentException() InvalidEnumArgumentException()

Initializes a new instance of the InvalidEnumArgumentException class without a message.

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

InvalidEnumArgumentException(String) InvalidEnumArgumentException(String) InvalidEnumArgumentException(String) InvalidEnumArgumentException(String)

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

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

Parameters

message
String String String String

The message to display with this exception.

InvalidEnumArgumentException(SerializationInfo, StreamingContext) InvalidEnumArgumentException(SerializationInfo, StreamingContext) InvalidEnumArgumentException(SerializationInfo, StreamingContext) InvalidEnumArgumentException(SerializationInfo, StreamingContext)

Initializes a new instance of the InvalidEnumArgumentException class using the specified serialization data and context.

protected:
 InvalidEnumArgumentException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected InvalidEnumArgumentException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.ComponentModel.InvalidEnumArgumentException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.ComponentModel.InvalidEnumArgumentException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

Parameters

context
StreamingContext StreamingContext StreamingContext StreamingContext

The destination to be used for deserialization.

InvalidEnumArgumentException(String, Exception) InvalidEnumArgumentException(String, Exception) InvalidEnumArgumentException(String, Exception) InvalidEnumArgumentException(String, Exception)

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

public:
 InvalidEnumArgumentException(System::String ^ message, Exception ^ innerException);
public InvalidEnumArgumentException (string message, Exception innerException);
new System.ComponentModel.InvalidEnumArgumentException : string * Exception -> System.ComponentModel.InvalidEnumArgumentException
Public Sub New (message As String, innerException As Exception)

Parameters

message
String String String String

A detailed description of the error.

innerException
Exception Exception Exception Exception

A reference to the inner exception that is the cause of this exception.

InvalidEnumArgumentException(String, Int32, Type) InvalidEnumArgumentException(String, Int32, Type) InvalidEnumArgumentException(String, Int32, Type) InvalidEnumArgumentException(String, Int32, Type)

Initializes a new instance of the InvalidEnumArgumentException class with a message generated from the argument, the invalid value, and an enumeration class.

public:
 InvalidEnumArgumentException(System::String ^ argumentName, int invalidValue, Type ^ enumClass);
public InvalidEnumArgumentException (string argumentName, int invalidValue, Type enumClass);
new System.ComponentModel.InvalidEnumArgumentException : string * int * Type -> System.ComponentModel.InvalidEnumArgumentException
Public Sub New (argumentName As String, invalidValue As Integer, enumClass As Type)

Parameters

argumentName
String String String String

The name of the argument that caused the exception.

invalidValue
Int32 Int32 Int32 Int32

The value of the argument that failed.

enumClass
Type Type Type Type

A Type that represents the enumeration class with the valid values.

Remarks

This constructor will create a localized message saying that the argumentName parameter was invalid because the value passed in was invalid, and that the value should be one of the values in the enumeration class.

Applies to