Partager via


OverflowException Constructeurs

Définition

Initialise une nouvelle instance de la classe OverflowException.

Surcharges

Nom Description
OverflowException()

Initialise une nouvelle instance de la classe OverflowException.

OverflowException(String)

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

OverflowException(SerializationInfo, StreamingContext)
Obsolète.

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

OverflowException(String, Exception)

Initialise une nouvelle instance de la OverflowException classe avec un message d’erreur spécifié et une référence à l’exception interne qui est la cause de cette exception.

OverflowException()

Source:
OverflowException.cs
Source:
OverflowException.cs
Source:
OverflowException.cs
Source:
OverflowException.cs
Source:
OverflowException.cs

Initialise une nouvelle instance de la classe OverflowException.

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

Remarques

Le tableau suivant présente les valeurs de propriété initiales d’une instance de OverflowException.

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

S’applique à

OverflowException(String)

Source:
OverflowException.cs
Source:
OverflowException.cs
Source:
OverflowException.cs
Source:
OverflowException.cs
Source:
OverflowException.cs

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

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

Paramètres

message
String

Message décrivant l’erreur.

Remarques

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

Le tableau suivant présente les valeurs de propriété initiales d’une instance de OverflowException.

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

S’applique à

OverflowException(SerializationInfo, StreamingContext)

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

protected:
 OverflowException(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 OverflowException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
protected OverflowException(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 OverflowException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> OverflowException
new OverflowException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> OverflowException
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

Remarques

Ce constructeur est appelé lors de la désérialisation pour rétablir l’objet d’exception transmis sur un flux.

S’applique à

OverflowException(String, Exception)

Source:
OverflowException.cs
Source:
OverflowException.cs
Source:
OverflowException.cs
Source:
OverflowException.cs
Source:
OverflowException.cs

Initialise une nouvelle instance de la OverflowException classe avec un message d’erreur spécifié et une référence à l’exception interne qui est la cause de cette exception.

public:
 OverflowException(System::String ^ message, Exception ^ innerException);
public OverflowException(string message, Exception innerException);
public OverflowException(string? message, Exception? innerException);
new OverflowException : string * Exception -> OverflowException
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 qui est la cause de l’exception actuelle. Si le innerException paramètre n’est pas une référence Null (Nothing en Visual Basic), 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 peut 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 au constructeur, ou une référence Null (Nothing en Visual Basic) 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 OverflowException.

Propriété Valeur
InnerException Référence d’exception interne.
Message Chaîne de message d’erreur.

Voir aussi

S’applique à