InvalidOleVariantTypeException Konstruktorer

Definition

Initierar en ny instans av InvalidOleVariantTypeException klassen.

Överlagringar

Name Description
InvalidOleVariantTypeException()

Initierar en ny instans av InvalidOleVariantTypeException klassen med standardvärden.

InvalidOleVariantTypeException(String)

Initierar en ny instans av InvalidOleVariantTypeException klassen med ett angivet meddelande.

InvalidOleVariantTypeException(SerializationInfo, StreamingContext)
Föråldrad.

Initierar en ny instans av InvalidOleVariantTypeException klassen från serialiseringsdata.

InvalidOleVariantTypeException(String, Exception)

Initierar en ny instans av InvalidOleVariantTypeException klassen med ett angivet felmeddelande och en referens till det inre undantaget som är orsaken till det här undantaget.

InvalidOleVariantTypeException()

Källa:
InvalidOleVariantTypeException.cs
Källa:
InvalidOleVariantTypeException.cs
Källa:
InvalidOleVariantTypeException.cs
Källa:
InvalidOleVariantTypeException.cs
Källa:
InvalidOleVariantTypeException.cs

Initierar en ny instans av InvalidOleVariantTypeException klassen med standardvärden.

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

Kommentarer

InvalidOleVariantTypeException ärver från SystemException. Den här konstruktorn anger egenskaperna för Exception objektet enligt följande tabell.

Fastighet Value
InnerException null.
Message En lokaliserad felmeddelandesträng.

Gäller för

InvalidOleVariantTypeException(String)

Källa:
InvalidOleVariantTypeException.cs
Källa:
InvalidOleVariantTypeException.cs
Källa:
InvalidOleVariantTypeException.cs
Källa:
InvalidOleVariantTypeException.cs
Källa:
InvalidOleVariantTypeException.cs

Initierar en ny instans av InvalidOleVariantTypeException klassen med ett angivet meddelande.

public:
 InvalidOleVariantTypeException(System::String ^ message);
public InvalidOleVariantTypeException(string message);
public InvalidOleVariantTypeException(string? message);
new System.Runtime.InteropServices.InvalidOleVariantTypeException : string -> System.Runtime.InteropServices.InvalidOleVariantTypeException
Public Sub New (message As String)

Parametrar

message
String

Meddelandet som anger orsaken till undantaget.

Kommentarer

InvalidOleVariantTypeException ärver från SystemException. Den här konstruktorn anger egenskaperna för Exception objektet enligt följande tabell.

Fastighet Value
InnerException null.
Message message

Gäller för

InvalidOleVariantTypeException(SerializationInfo, StreamingContext)

Källa:
InvalidOleVariantTypeException.cs
Källa:
InvalidOleVariantTypeException.cs
Källa:
InvalidOleVariantTypeException.cs
Källa:
InvalidOleVariantTypeException.cs
Källa:
InvalidOleVariantTypeException.cs

Varning

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

Initierar en ny instans av InvalidOleVariantTypeException klassen från serialiseringsdata.

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

Undantag

info är null.

Kommentarer

Den här konstruktorn anropas under deserialiseringen för att återskapa undantagsobjektet som överförs via en ström. Mer information finns i System.Runtime.Serialization.

InvalidOleVariantTypeException ärver från SystemException.

Gäller för

InvalidOleVariantTypeException(String, Exception)

Källa:
InvalidOleVariantTypeException.cs
Källa:
InvalidOleVariantTypeException.cs
Källa:
InvalidOleVariantTypeException.cs
Källa:
InvalidOleVariantTypeException.cs
Källa:
InvalidOleVariantTypeException.cs

Initierar en ny instans av InvalidOleVariantTypeException klassen med ett angivet felmeddelande och en referens till det inre undantaget som är orsaken till det här undantaget.

public:
 InvalidOleVariantTypeException(System::String ^ message, Exception ^ inner);
public InvalidOleVariantTypeException(string message, Exception inner);
public InvalidOleVariantTypeException(string? message, Exception? inner);
new System.Runtime.InteropServices.InvalidOleVariantTypeException : string * Exception -> System.Runtime.InteropServices.InvalidOleVariantTypeException
Public Sub New (message As String, inner As Exception)

Parametrar

message
String

Felmeddelandet som förklarar orsaken till undantaget.

inner
Exception

Undantaget som är orsaken till det aktuella undantaget. Om parametern inner inte nullär 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 bör innehålla en referens till det tidigare undantaget i InnerException egenskapen. Egenskapen InnerException returnerar samma värde som skickas till konstruktorn, eller null om InnerException egenskapen inte anger det inre undantagsvärdet till konstruktorn.

I följande tabell visas de inledande egenskapsvärdena för en instans av InvalidOleVariantTypeException.

Fastighet Value
InnerException Den inre undantagsreferensen.
Message Felmeddelandesträngen.

Se även

Gäller för