InvalidEnumArgumentException Constructors
Definition
Initializes a new instance of the InvalidEnumArgumentException class.
Overloads
InvalidEnumArgumentException() |
Initializes a new instance of the InvalidEnumArgumentException class without a message. |
InvalidEnumArgumentException(String) |
Initializes a new instance of the InvalidEnumArgumentException class with the specified message. |
InvalidEnumArgumentException(SerializationInfo, StreamingContext) |
Initializes a new instance of the InvalidEnumArgumentException class using the specified serialization data and context. |
InvalidEnumArgumentException(String, Exception) |
Initializes a new instance of the InvalidEnumArgumentException class with the specified detailed description and the specified exception. |
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()
Initializes a new instance of the InvalidEnumArgumentException class without a message.
public:
InvalidEnumArgumentException();
public InvalidEnumArgumentException ();
Public Sub New ()
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
The message to display with this exception.
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
- info
- SerializationInfo
The SerializationInfo to be used for deserialization.
- context
- StreamingContext
The destination to be used for deserialization.
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
A detailed description of the error.
- innerException
- Exception
A reference to the inner exception that is the cause of this exception.
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
The name of the argument that caused the exception.
- invalidValue
- Int32
The value of the argument that failed.
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.