CustomAttributeFormatException Konstruktorer

Definition

Initierar en ny instans av CustomAttributeFormatException klassen.

Överlagringar

Name Description
CustomAttributeFormatException()

Initierar en ny instans av CustomAttributeFormatException klassen med standardegenskaperna.

CustomAttributeFormatException(String)

Initierar en ny instans av CustomAttributeFormatException klassen med det angivna meddelandet.

CustomAttributeFormatException(SerializationInfo, StreamingContext)
Föråldrad.

Initierar en ny instans av CustomAttributeFormatException klassen med angiven serialisering och kontextinformation.

CustomAttributeFormatException(String, Exception)

Initierar en ny instans av CustomAttributeFormatException klassen med ett angivet felmeddelande och en referens till det inre undantaget som är orsaken till det här undantaget.

CustomAttributeFormatException()

Källa:
CustomAttributeFormatException.cs
Källa:
CustomAttributeFormatException.cs
Källa:
CustomAttributeFormatException.cs
Källa:
CustomAttributeFormatException.cs
Källa:
CustomAttributeFormatException.cs

Initierar en ny instans av CustomAttributeFormatException klassen med standardegenskaperna.

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

Kommentarer

Den här konstruktorn initierar en instans av CustomAttributeFormatException med en tom meddelandesträng och rotorsaksfelet inställt på null.

Den här konstruktorn anger egenskaperna för objektet enligt Exception följande:

Fastighet Value
InnerException noll
Message Den tomma strängen ("").

Gäller för

CustomAttributeFormatException(String)

Källa:
CustomAttributeFormatException.cs
Källa:
CustomAttributeFormatException.cs
Källa:
CustomAttributeFormatException.cs
Källa:
CustomAttributeFormatException.cs
Källa:
CustomAttributeFormatException.cs

Initierar en ny instans av CustomAttributeFormatException klassen med det angivna meddelandet.

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

Parametrar

message
String

Meddelandet som anger orsaken till att det här undantaget utlöstes.

Kommentarer

Den här konstruktorn anger egenskaperna för undantagsobjektet på följande sätt:

Fastighet Value
InnerException null

Se även

Gäller för

CustomAttributeFormatException(SerializationInfo, StreamingContext)

Källa:
CustomAttributeFormatException.cs
Källa:
CustomAttributeFormatException.cs
Källa:
CustomAttributeFormatException.cs
Källa:
CustomAttributeFormatException.cs
Källa:
CustomAttributeFormatException.cs

Varning

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

Initierar en ny instans av CustomAttributeFormatException klassen med angiven serialisering och kontextinformation.

protected:
 CustomAttributeFormatException(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 CustomAttributeFormatException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
protected CustomAttributeFormatException(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.Reflection.CustomAttributeFormatException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Reflection.CustomAttributeFormatException
new System.Reflection.CustomAttributeFormatException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Reflection.CustomAttributeFormatException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

Parametrar

info
SerializationInfo

Data för serialisering eller deserialisering av det anpassade attributet.

context
StreamingContext

Källan och målet för det anpassade attributet.

Attribut

Gäller för

CustomAttributeFormatException(String, Exception)

Källa:
CustomAttributeFormatException.cs
Källa:
CustomAttributeFormatException.cs
Källa:
CustomAttributeFormatException.cs
Källa:
CustomAttributeFormatException.cs
Källa:
CustomAttributeFormatException.cs

Initierar en ny instans av CustomAttributeFormatException klassen med ett angivet felmeddelande och en referens till det inre undantaget som är orsaken till det här undantaget.

public:
 CustomAttributeFormatException(System::String ^ message, Exception ^ inner);
public CustomAttributeFormatException(string? message, Exception? inner);
public CustomAttributeFormatException(string message, Exception inner);
new System.Reflection.CustomAttributeFormatException : string * Exception -> System.Reflection.CustomAttributeFormatException
Public Sub New (message As String, inner As Exception)

Parametrar

message
String

Felmeddelandet som förklarar orsaken till undantaget.

inner
Exception

Undantaget som är orsaken till det aktuella undantaget. Om parametern inner inte nullär genereras det aktuella undantaget i ett catch block som hanterar det inre undantaget.

Kommentarer

Ett undantag som genereras som ett direkt resultat av ett tidigare undantag bör innehålla en referens till det tidigare undantaget i InnerException egenskapen. Egenskapen InnerException returnerar samma värde som skickas till konstruktorn, eller null om InnerException egenskapen inte anger det inre undantagsvärdet till konstruktorn.

I följande tabell visas de inledande egenskapsvärdena för en instans av CustomAttributeFormatException.

Fastighet Value
InnerException Undantaget inner .
Message Felmeddelandesträngen.

Se även

Gäller för