InvalidOleVariantTypeException Konstruktory
Definicja
Ważne
Niektóre informacje odnoszą się do produktu w wersji wstępnej, który może zostać znacząco zmodyfikowany przed wydaniem. Firma Microsoft nie udziela żadnych gwarancji, jawnych lub domniemanych, w odniesieniu do informacji podanych w tym miejscu.
Inicjuje nowe wystąpienie klasy InvalidOleVariantTypeException.
Przeciążenia
| Nazwa | Opis |
|---|---|
| InvalidOleVariantTypeException() |
Inicjuje |
| InvalidOleVariantTypeException(String) |
Inicjuje nowe wystąpienie |
| InvalidOleVariantTypeException(SerializationInfo, StreamingContext) |
Przestarzałe.
Inicjuje |
| InvalidOleVariantTypeException(String, Exception) |
Inicjuje nowe wystąpienie InvalidOleVariantTypeException klasy z określonym komunikatem o błędzie i odwołaniem do wyjątku wewnętrznego, który jest przyczyną tego wyjątku. |
InvalidOleVariantTypeException()
Inicjuje InvalidOleVariantTypeException nowe wystąpienie klasy z wartościami domyślnymi.
public:
InvalidOleVariantTypeException();
public InvalidOleVariantTypeException();
Public Sub New ()
Uwagi
InvalidOleVariantTypeException dziedziczy z SystemException. Ten konstruktor ustawia właściwości Exception obiektu, jak pokazano w poniższej tabeli.
| Majątek | Wartość |
|---|---|
| InnerException |
null. |
| Message | Zlokalizowany ciąg komunikatu o błędzie. |
Dotyczy
InvalidOleVariantTypeException(String)
Inicjuje nowe wystąpienie InvalidOleVariantTypeException klasy z określonym komunikatem.
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)
Parametry
- message
- String
Komunikat wskazujący przyczynę wyjątku.
Uwagi
InvalidOleVariantTypeException dziedziczy z SystemException. Ten konstruktor ustawia właściwości Exception obiektu, jak pokazano w poniższej tabeli.
| Majątek | Wartość |
|---|---|
| InnerException |
null. |
| Message | message |
Dotyczy
InvalidOleVariantTypeException(SerializationInfo, StreamingContext)
Uwaga
This API supports obsolete formatter-based serialization. It should not be called or extended by application code.
Inicjuje InvalidOleVariantTypeException nowe wystąpienie klasy z danych serializacji.
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)
Parametry
- info
- SerializationInfo
Obiekt, który przechowuje serializowane dane obiektu.
- context
- StreamingContext
Kontekstowe informacje o źródle lub miejscu docelowym.
- Atrybuty
Wyjątki
Parametr info ma wartość null.
Uwagi
Ten konstruktor jest wywoływany podczas deserializacji w celu ponownego utworzenia obiektu wyjątku przesyłanego przez strumień. Aby uzyskać więcej informacji, zobacz System.Runtime.Serialization.
InvalidOleVariantTypeException dziedziczy z SystemException.
Dotyczy
InvalidOleVariantTypeException(String, Exception)
Inicjuje nowe wystąpienie InvalidOleVariantTypeException klasy z określonym komunikatem o błędzie i odwołaniem do wyjątku wewnętrznego, który jest przyczyną tego wyjątku.
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)
Parametry
- message
- String
Komunikat o błędzie wyjaśniający przyczynę wyjątku.
- inner
- Exception
Wyjątek, który jest przyczyną bieżącego wyjątku. Jeśli parametr inner nie jest null, bieżący wyjątek jest zgłaszany w bloku catch, który obsługuje wyjątek wewnętrzny.
Uwagi
Wyjątek zgłaszany bezpośrednio w wyniku poprzedniego wyjątku powinien zawierać odwołanie do poprzedniego wyjątku we właściwości InnerException. Właściwość InnerException zwraca tę samą wartość, która jest przekazywana do konstruktora, lub null, jeśli właściwość InnerException nie dostarcza wartości wyjątku wewnętrznego do konstruktora.
W poniższej tabeli przedstawiono początkowe wartości właściwości dla wystąpienia InvalidOleVariantTypeException.
| Majątek | Wartość |
|---|---|
| InnerException | Odwołanie do wyjątku wewnętrznego. |
| Message | Ciąg komunikatu o błędzie. |