InvalidEnumArgumentException Konstruktory
Ważne
Niektóre informacje odnoszą się do produktu w wersji wstępnej, który może zostać znacząco zmodyfikowany przed wydaniem. Firma Microsoft nie udziela żadnych gwarancji, jawnych lub domniemanych, w odniesieniu do informacji podanych w tym miejscu.
Inicjuje nowe wystąpienie klasy InvalidEnumArgumentException.
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. |
Inicjuje InvalidEnumArgumentException nowe wystąpienie klasy bez komunikatu.
public:
InvalidEnumArgumentException();
public InvalidEnumArgumentException ();
Public Sub New ()
Dotyczy
.NET 9 i inne wersje
Produkt | Wersje |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
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
.NET 9 i inne wersje
Produkt | Wersje |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
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
.NET 9 i inne wersje
Produkt | Wersje (Przestarzałe) |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7 (8, 9) |
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
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
.NET 9 i inne wersje
Produkt | Wersje |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
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.
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
.NET 9 i inne wersje
Produkt | Wersje |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
Opinia o produkcie .NET
.NET to projekt typu open source. Wybierz link, aby przekazać opinię: