ExternalException Constructeurs
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Initialise une nouvelle instance de la classe ExternalException.
Surcharges
| Nom | Description |
|---|---|
| ExternalException() |
Initialise une nouvelle instance de la |
| ExternalException(String) |
Initialise une nouvelle instance de la |
| ExternalException(SerializationInfo, StreamingContext) |
Obsolète.
Initialise une nouvelle instance de la |
| ExternalException(String, Exception) |
Initialise une nouvelle instance de la ExternalException classe avec un message d’erreur spécifié et une référence à l’exception interne qui est la cause de cette exception. |
| ExternalException(String, Int32) |
Initialise une nouvelle instance de la |
ExternalException()
- Source:
- ExternalException.cs
- Source:
- ExternalException.cs
- Source:
- ExternalException.cs
- Source:
- ExternalException.cs
- Source:
- ExternalException.cs
Initialise une nouvelle instance de la ExternalException classe avec des propriétés par défaut.
public:
ExternalException();
public ExternalException();
Public Sub New ()
Remarques
Le tableau suivant présente les valeurs de propriété initiales d’une instance de ExternalException.
| Propriété | Valeur |
|---|---|
| InnerException | Référence Null (Nothing en Visual Basic). |
| Message | Chaîne de message d’erreur localisée. |
S’applique à
ExternalException(String)
- Source:
- ExternalException.cs
- Source:
- ExternalException.cs
- Source:
- ExternalException.cs
- Source:
- ExternalException.cs
- Source:
- ExternalException.cs
Initialise une nouvelle instance de la ExternalException classe avec un message d’erreur spécifié.
public:
ExternalException(System::String ^ message);
public ExternalException(string? message);
public ExternalException(string message);
new System.Runtime.InteropServices.ExternalException : string -> System.Runtime.InteropServices.ExternalException
Public Sub New (message As String)
Paramètres
- message
- String
Message d’erreur qui spécifie la raison de l’exception.
Remarques
Le tableau suivant présente les valeurs de propriété initiales d’une instance de ExternalException.
| Propriété | Valeur |
|---|---|
| InnerException | Référence Null (Nothing en Visual Basic). |
| Message | Chaîne de message d’erreur. |
S’applique à
ExternalException(SerializationInfo, StreamingContext)
- Source:
- ExternalException.cs
- Source:
- ExternalException.cs
- Source:
- ExternalException.cs
- Source:
- ExternalException.cs
- Source:
- ExternalException.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 ExternalException classe à partir de données de sérialisation.
protected:
ExternalException(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 ExternalException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
protected ExternalException(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.Runtime.InteropServices.ExternalException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Runtime.InteropServices.ExternalException
new System.Runtime.InteropServices.ExternalException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Runtime.InteropServices.ExternalException
Protected Sub New (info As SerializationInfo, context As StreamingContext)
Paramètres
- info
- SerializationInfo
Objet qui contient les données d’objet sérialisées.
- context
- StreamingContext
Informations contextuelles sur la source ou la destination.
- Attributs
Exceptions
info a la valeur null.
Remarques
Ce constructeur est appelé lors de la désérialisation pour rétablir l’objet d’exception transmis sur un flux. Pour plus d’informations, consultez sérialisation XML et SOAP.
S’applique à
ExternalException(String, Exception)
- Source:
- ExternalException.cs
- Source:
- ExternalException.cs
- Source:
- ExternalException.cs
- Source:
- ExternalException.cs
- Source:
- ExternalException.cs
Initialise une nouvelle instance de la ExternalException classe avec un message d’erreur spécifié et une référence à l’exception interne qui est la cause de cette exception.
public:
ExternalException(System::String ^ message, Exception ^ inner);
public ExternalException(string? message, Exception? inner);
public ExternalException(string message, Exception inner);
new System.Runtime.InteropServices.ExternalException : string * Exception -> System.Runtime.InteropServices.ExternalException
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 qui est la cause de l’exception actuelle. Si le inner paramètre n’est pas null, l’exception actuelle est levée dans un catch bloc qui gère l’exception interne.
Remarques
Une exception levée en conséquence directe d’une exception précédente doit inclure une référence à l’exception précédente dans la InnerException propriété. La InnerException propriété retourne la même valeur que celle passée dans le constructeur, ou null si la InnerException propriété ne fournit pas la valeur d’exception interne au constructeur.
Le tableau suivant présente les valeurs de propriété initiales d’une instance de ExternalException.
| Propriété | Valeur |
|---|---|
| InnerException | Référence d’exception interne. |
| Message | Chaîne de message d’erreur. |
Voir aussi
S’applique à
ExternalException(String, Int32)
- Source:
- ExternalException.cs
- Source:
- ExternalException.cs
- Source:
- ExternalException.cs
- Source:
- ExternalException.cs
- Source:
- ExternalException.cs
Initialise une nouvelle instance de la ExternalException classe avec un message d’erreur spécifié et hrESULT de l’erreur.
public:
ExternalException(System::String ^ message, int errorCode);
public ExternalException(string? message, int errorCode);
public ExternalException(string message, int errorCode);
new System.Runtime.InteropServices.ExternalException : string * int -> System.Runtime.InteropServices.ExternalException
Public Sub New (message As String, errorCode As Integer)
Paramètres
- message
- String
Message d’erreur qui spécifie la raison de l’exception.
- errorCode
- Int32
HRESULT de l’erreur.
Remarques
Le tableau suivant présente les valeurs de propriété initiales d’une instance de ExternalException.
| Propriété | Valeur |
|---|---|
| ErrorCode | HRESULT de l’erreur. |
| InnerException | Référence Null (Nothing en Visual Basic). |
| Message | Chaîne de message d’erreur. |