OverflowException Konstruktorer
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Initierar en ny instans av OverflowException klassen.
Överlagringar
| Name | Description |
|---|---|
| OverflowException() |
Initierar en ny instans av OverflowException klassen. |
| OverflowException(String) |
Initierar en ny instans av OverflowException klassen med ett angivet felmeddelande. |
| OverflowException(SerializationInfo, StreamingContext) |
Föråldrad.
Initierar en ny instans av OverflowException klassen med serialiserade data. |
| OverflowException(String, Exception) |
Initierar en ny instans av OverflowException klassen med ett angivet felmeddelande och en referens till det inre undantaget som är orsaken till det här undantaget. |
OverflowException()
- Källa:
- OverflowException.cs
- Källa:
- OverflowException.cs
- Källa:
- OverflowException.cs
- Källa:
- OverflowException.cs
- Källa:
- OverflowException.cs
Initierar en ny instans av OverflowException klassen.
public:
OverflowException();
public OverflowException();
Public Sub New ()
Kommentarer
I följande tabell visas de inledande egenskapsvärdena för en instans av OverflowException.
| Fastighet | Value |
|---|---|
| InnerException | En null-referens (Nothing i Visual Basic). |
| Message | Den lokaliserade felmeddelandesträngen. |
Gäller för
OverflowException(String)
- Källa:
- OverflowException.cs
- Källa:
- OverflowException.cs
- Källa:
- OverflowException.cs
- Källa:
- OverflowException.cs
- Källa:
- OverflowException.cs
Initierar en ny instans av OverflowException klassen med ett angivet felmeddelande.
public:
OverflowException(System::String ^ message);
public OverflowException(string message);
public OverflowException(string? message);
new OverflowException : string -> OverflowException
Public Sub New (message As String)
Parametrar
- message
- String
Meddelandet som beskriver felet.
Kommentarer
Innehållet i message ska vara begripligt för användaren. Anroparen för den här konstruktorn krävs för att säkerställa att den här strängen har lokaliserats för den aktuella systemkulturen.
I följande tabell visas de inledande egenskapsvärdena för en instans av OverflowException.
| Fastighet | Value |
|---|---|
| InnerException | En null-referens (Nothing i Visual Basic). |
| Message | Felmeddelandesträngen. |
Gäller för
OverflowException(SerializationInfo, StreamingContext)
- Källa:
- OverflowException.cs
- Källa:
- OverflowException.cs
- Källa:
- OverflowException.cs
- Källa:
- OverflowException.cs
- Källa:
- OverflowException.cs
Varning
This API supports obsolete formatter-based serialization. It should not be called or extended by application code.
Initierar en ny instans av OverflowException klassen med serialiserade data.
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)
Parametrar
- info
- SerializationInfo
Objektet som innehåller serialiserade objektdata.
- context
- StreamingContext
Sammanhangsinformation om källan eller målet.
- Attribut
Kommentarer
Den här konstruktorn anropas under deserialiseringen för att återskapa undantagsobjektet som överförs via en ström.
Gäller för
OverflowException(String, Exception)
- Källa:
- OverflowException.cs
- Källa:
- OverflowException.cs
- Källa:
- OverflowException.cs
- Källa:
- OverflowException.cs
- Källa:
- OverflowException.cs
Initierar en ny instans av OverflowException klassen med ett angivet felmeddelande och en referens till det inre undantaget som är orsaken till det här undantaget.
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)
Parametrar
- message
- String
Felmeddelandet som förklarar orsaken till undantaget.
- innerException
- Exception
Undantaget som är orsaken till det aktuella undantaget. Om parametern innerException inte är en null-referens (Nothing i Visual Basic) 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 kan innehålla en referens till det tidigare undantaget i InnerException egenskapen. Egenskapen InnerException returnerar samma värde som skickas till konstruktorn eller en nullreferens (Nothing i Visual Basic) om egenskapen InnerException inte anger det inre undantagsvärdet till konstruktorn.
I följande tabell visas de inledande egenskapsvärdena för en instans av OverflowException.
| Fastighet | Value |
|---|---|
| InnerException | Den inre undantagsreferensen. |
| Message | Felmeddelandesträngen. |