CustomAttributeFormatException Constructeurs

Définition

Initialise une nouvelle instance de la classe CustomAttributeFormatException.

Surcharges

CustomAttributeFormatException()

Initialise une nouvelle instance de la classe CustomAttributeFormatException avec les propriétés par défaut.

CustomAttributeFormatException(String)

Initialise une nouvelle instance de la classe CustomAttributeFormatException avec le message spécifié.

CustomAttributeFormatException(SerializationInfo, StreamingContext)
Obsolète.

Initialise une nouvelle instance de la classe CustomAttributeFormatException avec les informations de contexte et de sérialisation spécifiées.

CustomAttributeFormatException(String, Exception)

Initialise une nouvelle instance de la classe CustomAttributeFormatException avec un message d'erreur spécifié et une référence à l'exception interne ayant provoqué cette exception.

CustomAttributeFormatException()

Source:
CustomAttributeFormatException.cs
Source:
CustomAttributeFormatException.cs
Source:
CustomAttributeFormatException.cs

Initialise une nouvelle instance de la classe CustomAttributeFormatException avec les propriétés par défaut.

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

Remarques

Ce constructeur initialise un instance de avec une chaîne de CustomAttributeFormatException message vide et l’exception de cause racine définie sur null.

Ce constructeur définit les propriétés de l’objet Exception comme suit :

Propriété Value
InnerException null
Message Chaîne vide («  »).

S’applique à

CustomAttributeFormatException(String)

Source:
CustomAttributeFormatException.cs
Source:
CustomAttributeFormatException.cs
Source:
CustomAttributeFormatException.cs

Initialise une nouvelle instance de la classe CustomAttributeFormatException avec le message spécifié.

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)

Paramètres

message
String

Message indiquant la raison pour laquelle l'exception a été levée.

Remarques

Ce constructeur définit les propriétés de l’objet Exception comme suit :

Propriété Valeur
InnerException null

Voir aussi

S’applique à

CustomAttributeFormatException(SerializationInfo, StreamingContext)

Source:
CustomAttributeFormatException.cs
Source:
CustomAttributeFormatException.cs
Source:
CustomAttributeFormatException.cs

Attention

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

Initialise une nouvelle instance de la classe CustomAttributeFormatException avec les informations de contexte et de sérialisation spécifiées.

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

Paramètres

info
SerializationInfo

Données de sérialisation ou de désérialisation de l'attribut personnalisé.

context
StreamingContext

Source et destination de l'attribut personnalisé.

Attributs

S’applique à

CustomAttributeFormatException(String, Exception)

Source:
CustomAttributeFormatException.cs
Source:
CustomAttributeFormatException.cs
Source:
CustomAttributeFormatException.cs

Initialise une nouvelle instance de la classe CustomAttributeFormatException avec un message d'erreur spécifié et une référence à l'exception interne ayant provoqué cette exception.

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)

Paramètres

message
String

Message d'erreur qui explique la raison de l'exception.

inner
Exception

Exception ayant provoqué l'exception actuelle. Si le paramètre inner n'est pas null, l'exception actuelle est levée dans un bloc catch qui gère l'exception interne.

Remarques

Une exception levée en conséquence directe d'une exception précédente doit contenir une référence à celle-ci dans la propriété InnerException. La propriété InnerException retourne la valeur passée au constructeur ou la valeur null si la propriété InnerException ne fournit pas la valeur d'exception interne au constructeur.

Le tableau suivant affiche les valeurs de propriété initiales pour une instance de CustomAttributeFormatException.

Propriété Valeur
InnerException Exception inner .
Message Chaîne du message d'erreur.

Voir aussi

S’applique à