InvalidEnumArgumentException Konstruktory

Definicja

Inicjuje nowe wystąpienie klasy InvalidEnumArgumentException.

Przeciążenia

InvalidEnumArgumentException()

Inicjuje InvalidEnumArgumentException nowe wystąpienie klasy bez komunikatu.

InvalidEnumArgumentException(String)

Inicjuje nowe wystąpienie klasy InvalidEnumArgumentException z określonym komunikatem.

InvalidEnumArgumentException(SerializationInfo, StreamingContext)
Przestarzałe.

Inicjuje InvalidEnumArgumentException nowe wystąpienie klasy przy użyciu określonych danych serializacji i kontekstu.

InvalidEnumArgumentException(String, Exception)

Inicjuje nowe wystąpienie InvalidEnumArgumentException klasy z określonym szczegółowym opisem i określonym wyjątkiem.

InvalidEnumArgumentException(String, Int32, Type)

Inicjuje nowe wystąpienie InvalidEnumArgumentException klasy z komunikatem wygenerowanym na podstawie argumentu, nieprawidłową wartością i klasą wyliczenia.

InvalidEnumArgumentException()

Źródło:
InvalidEnumArgumentException.cs
Źródło:
InvalidEnumArgumentException.cs
Źródło:
InvalidEnumArgumentException.cs

Inicjuje InvalidEnumArgumentException nowe wystąpienie klasy bez komunikatu.

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

Dotyczy

InvalidEnumArgumentException(String)

Źródło:
InvalidEnumArgumentException.cs
Źródło:
InvalidEnumArgumentException.cs
Źródło:
InvalidEnumArgumentException.cs

Inicjuje nowe wystąpienie klasy InvalidEnumArgumentException z określonym komunikatem.

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

Parametry

message
String

Komunikat do wyświetlenia z tym wyjątkiem.

Dotyczy

InvalidEnumArgumentException(SerializationInfo, StreamingContext)

Źródło:
InvalidEnumArgumentException.cs
Źródło:
InvalidEnumArgumentException.cs
Źródło:
InvalidEnumArgumentException.cs

Przestroga

This API supports obsolete formatter-based serialization. It should not be called or extended by application code.

Inicjuje InvalidEnumArgumentException nowe wystąpienie klasy przy użyciu określonych danych serializacji i kontekstu.

protected:
 InvalidEnumArgumentException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected InvalidEnumArgumentException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
[System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
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
[<System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.ComponentModel.InvalidEnumArgumentException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.ComponentModel.InvalidEnumArgumentException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

Parametry

info
SerializationInfo

Element SerializationInfo , który ma być używany do deserializacji.

context
StreamingContext

Miejsce docelowe, które ma być używane do deserializacji.

Atrybuty

Dotyczy

InvalidEnumArgumentException(String, Exception)

Źródło:
InvalidEnumArgumentException.cs
Źródło:
InvalidEnumArgumentException.cs
Źródło:
InvalidEnumArgumentException.cs

Inicjuje nowe wystąpienie InvalidEnumArgumentException klasy z określonym szczegółowym opisem i określonym wyjątkiem.

public:
 InvalidEnumArgumentException(System::String ^ message, Exception ^ innerException);
public InvalidEnumArgumentException (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)

Parametry

message
String

Szczegółowy opis błędu.

innerException
Exception

Odwołanie do wyjątku wewnętrznego, który jest przyczyną tego wyjątku.

Dotyczy

InvalidEnumArgumentException(String, Int32, Type)

Źródło:
InvalidEnumArgumentException.cs
Źródło:
InvalidEnumArgumentException.cs
Źródło:
InvalidEnumArgumentException.cs

Inicjuje nowe wystąpienie InvalidEnumArgumentException klasy z komunikatem wygenerowanym na podstawie argumentu, nieprawidłową wartością i klasą wyliczenia.

public:
 InvalidEnumArgumentException(System::String ^ argumentName, int invalidValue, Type ^ enumClass);
public InvalidEnumArgumentException (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)

Parametry

argumentName
String

Nazwa argumentu, który spowodował wyjątek.

invalidValue
Int32

Wartość argumentu, który zakończył się niepowodzeniem.

enumClass
Type

Element Type reprezentujący klasę wyliczenia z prawidłowymi wartościami.

Uwagi

Ten konstruktor utworzy zlokalizowany komunikat z informacją, że argumentName parametr był nieprawidłowy, ponieważ przekazana wartość była nieprawidłowa i że wartość powinna być jedną z wartości w klasie wyliczenia.

Dotyczy