TypeUnloadedException Constructeurs

Définition

Initialise une nouvelle instance de la classe TypeUnloadedException.

Surcharges

TypeUnloadedException()

Initialise une nouvelle instance de la classe TypeUnloadedException.

TypeUnloadedException(String)

Initialise une nouvelle instance de la classe TypeUnloadedException avec un message d'erreur spécifié.

TypeUnloadedException(SerializationInfo, StreamingContext)
Obsolète.

Initialise une nouvelle instance de la classe TypeUnloadedException avec des données sérialisées.

TypeUnloadedException(String, Exception)

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

TypeUnloadedException()

Source:
TypeUnloadedException.cs
Source:
TypeUnloadedException.cs
Source:
TypeUnloadedException.cs

Initialise une nouvelle instance de la classe TypeUnloadedException.

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

Remarques

Ce constructeur initialise la Message propriété du nouveau instance à un message fourni par le système qui décrit l’erreur, par exemple « Le type a été déchargé ». Ce message prend en compte la culture système actuelle.

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

Propriété Valeur
InnerException Référence Null (Nothing en Visual Basic).
Message Chaîne du message d'erreur localisé.

S’applique à

TypeUnloadedException(String)

Source:
TypeUnloadedException.cs
Source:
TypeUnloadedException.cs
Source:
TypeUnloadedException.cs

Initialise une nouvelle instance de la classe TypeUnloadedException avec un message d'erreur spécifié.

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

Paramètres

message
String

Message décrivant l'erreur.

Remarques

Le contenu du message paramètre doit être compréhensible par l’utilisateur final. L'appelant de ce constructeur est requis pour vérifier que cette chaîne a été localisée pour la culture système actuelle.

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

Propriété Valeur
InnerException Référence Null (Nothing en Visual Basic).
Message Chaîne du message d'erreur.

S’applique à

TypeUnloadedException(SerializationInfo, StreamingContext)

Source:
TypeUnloadedException.cs
Source:
TypeUnloadedException.cs
Source:
TypeUnloadedException.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 TypeUnloadedException avec des données sérialisées.

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

Paramètres

info
SerializationInfo

Objet qui contient les données sérialisées de l'objet.

context
StreamingContext

Informations contextuelles sur la source ou la destination.

Attributs

Remarques

Ce constructeur est appelé lors de la désérialisation afin de reconstituer l'objet exception transmis sur un flux. Pour plus d’informations, consultez Sérialisation XML et SOAP.

Voir aussi

S’applique à

TypeUnloadedException(String, Exception)

Source:
TypeUnloadedException.cs
Source:
TypeUnloadedException.cs
Source:
TypeUnloadedException.cs

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

public:
 TypeUnloadedException(System::String ^ message, Exception ^ innerException);
public TypeUnloadedException (string? message, Exception? innerException);
public TypeUnloadedException (string message, Exception innerException);
new TypeUnloadedException : string * Exception -> TypeUnloadedException
Public Sub New (message As String, innerException As Exception)

Paramètres

message
String

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

innerException
Exception

Exception ayant provoqué l'exception actuelle. Si le paramètre innerException n'est pas une référence null (Nothing en Visual Basic), l'exception actuelle est levée dans un bloc catch qui gère l'exception interne.

Remarques

Une exception qui est levée en conséquence directe d'une exception précédente peut contenir une référence à l'exception précédente dans la propriété InnerException. La propriété InnerException retourne la même valeur que celle qui a été passée dans le constructeur ou une référence Null (Nothing en Visual Basic), si la propriété InnerException ne fournit pas la valeur de l'exception interne au constructeur.

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

Propriété Value
InnerException La référence à l'exception interne.
Message Chaîne du message d'erreur.

Voir aussi

S’applique à