InvalidEnumArgumentException Konstruktory

Definice

Inicializuje novou instanci InvalidEnumArgumentException třídy.

Přetížení

Name Description
InvalidEnumArgumentException()

Inicializuje novou instanci InvalidEnumArgumentException třídy bez zprávy.

InvalidEnumArgumentException(String)

Inicializuje novou instanci InvalidEnumArgumentException třídy se zadanou zprávou.

InvalidEnumArgumentException(SerializationInfo, StreamingContext)
Zastaralé.

Inicializuje novou instanci InvalidEnumArgumentException třídy pomocí zadaných serializačních dat a kontextu.

InvalidEnumArgumentException(String, Exception)

Inicializuje novou instanci InvalidEnumArgumentException třídy se zadaným podrobným popisem a zadanou výjimkou.

InvalidEnumArgumentException(String, Int32, Type)

Inicializuje novou instanci InvalidEnumArgumentException třídy zprávou vygenerovanou z argumentu, neplatnou hodnotu a třídu výčtu.

InvalidEnumArgumentException()

Zdroj:
InvalidEnumArgumentException.cs
Zdroj:
InvalidEnumArgumentException.cs
Zdroj:
InvalidEnumArgumentException.cs
Zdroj:
InvalidEnumArgumentException.cs
Zdroj:
InvalidEnumArgumentException.cs

Inicializuje novou instanci InvalidEnumArgumentException třídy bez zprávy.

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

Platí pro

InvalidEnumArgumentException(String)

Zdroj:
InvalidEnumArgumentException.cs
Zdroj:
InvalidEnumArgumentException.cs
Zdroj:
InvalidEnumArgumentException.cs
Zdroj:
InvalidEnumArgumentException.cs
Zdroj:
InvalidEnumArgumentException.cs

Inicializuje novou instanci InvalidEnumArgumentException třídy se zadanou zprávou.

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

Zpráva, která se má zobrazit s touto výjimkou.

Platí pro

InvalidEnumArgumentException(SerializationInfo, StreamingContext)

Zdroj:
InvalidEnumArgumentException.cs
Zdroj:
InvalidEnumArgumentException.cs
Zdroj:
InvalidEnumArgumentException.cs
Zdroj:
InvalidEnumArgumentException.cs
Zdroj:
InvalidEnumArgumentException.cs

Upozornění

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

Inicializuje novou instanci InvalidEnumArgumentException třídy pomocí zadaných serializačních dat a kontextu.

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);
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}")>]
new System.ComponentModel.InvalidEnumArgumentException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.ComponentModel.InvalidEnumArgumentException
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

Slouží SerializationInfo k deserializaci.

context
StreamingContext

Cíl, který se má použít k deserializaci.

Atributy

Platí pro

InvalidEnumArgumentException(String, Exception)

Zdroj:
InvalidEnumArgumentException.cs
Zdroj:
InvalidEnumArgumentException.cs
Zdroj:
InvalidEnumArgumentException.cs
Zdroj:
InvalidEnumArgumentException.cs
Zdroj:
InvalidEnumArgumentException.cs

Inicializuje novou instanci InvalidEnumArgumentException třídy se zadaným podrobným popisem a zadanou výjimkou.

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

Podrobný popis chyby.

innerException
Exception

Odkaz na vnitřní výjimku, která je příčinou této výjimky.

Platí pro

InvalidEnumArgumentException(String, Int32, Type)

Zdroj:
InvalidEnumArgumentException.cs
Zdroj:
InvalidEnumArgumentException.cs
Zdroj:
InvalidEnumArgumentException.cs
Zdroj:
InvalidEnumArgumentException.cs
Zdroj:
InvalidEnumArgumentException.cs

Inicializuje novou instanci InvalidEnumArgumentException třídy zprávou vygenerovanou z argumentu, neplatnou hodnotu a třídu výčtu.

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

Název argumentu, který způsobil výjimku.

invalidValue
Int32

Hodnota argumentu, který selhal.

enumClass
Type

A Type , který představuje třídu výčtu s platnými hodnotami.

Poznámky

Tento konstruktor vytvoří lokalizovanou zprávu s informací, že argumentName parametr byl neplatný, protože hodnota předaná byla neplatná a že hodnota by měla být jednou z hodnot ve třídě výčtu.

Platí pro