共用方式為


InvalidOleVariantTypeException 建構函式

定義

初始化 InvalidOleVariantTypeException 類別的新執行個體。

多載

名稱 Description
InvalidOleVariantTypeException()

使用預設值,初始化 InvalidOleVariantTypeException 類別的新實例。

InvalidOleVariantTypeException(String)

初始化類別的新實例 InvalidOleVariantTypeException ,並指定訊息。

InvalidOleVariantTypeException(SerializationInfo, StreamingContext)
已淘汰.

從序列化資料初始化該類別的新實例 InvalidOleVariantTypeException

InvalidOleVariantTypeException(String, Exception)

初始化類別的新實例 InvalidOleVariantTypeException ,並附上指定的錯誤訊息及導致該異常的內部例外的參考。

InvalidOleVariantTypeException()

來源:
InvalidOleVariantTypeException.cs
來源:
InvalidOleVariantTypeException.cs
來源:
InvalidOleVariantTypeException.cs
來源:
InvalidOleVariantTypeException.cs
來源:
InvalidOleVariantTypeException.cs

使用預設值,初始化 InvalidOleVariantTypeException 類別的新實例。

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

備註

InvalidOleVariantTypeException 繼承自 SystemException。 此建構器設定物件的 Exception 屬性如下表所示。

房產 價值
InnerException null
Message 一個局部錯誤訊息字串。

適用於

InvalidOleVariantTypeException(String)

來源:
InvalidOleVariantTypeException.cs
來源:
InvalidOleVariantTypeException.cs
來源:
InvalidOleVariantTypeException.cs
來源:
InvalidOleVariantTypeException.cs
來源:
InvalidOleVariantTypeException.cs

初始化類別的新實例 InvalidOleVariantTypeException ,並指定訊息。

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)

參數

message
String

說明例外原因的訊息。

備註

InvalidOleVariantTypeException 繼承自 SystemException。 此建構器設定物件的 Exception 屬性如下表所示。

房產 價值
InnerException null
Message message

適用於

InvalidOleVariantTypeException(SerializationInfo, StreamingContext)

來源:
InvalidOleVariantTypeException.cs
來源:
InvalidOleVariantTypeException.cs
來源:
InvalidOleVariantTypeException.cs
來源:
InvalidOleVariantTypeException.cs
來源:
InvalidOleVariantTypeException.cs

警告

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

從序列化資料初始化該類別的新實例 InvalidOleVariantTypeException

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)

參數

info
SerializationInfo

存放序列化物件資料的物件。

context
StreamingContext

關於來源或目的地的上下文資訊。

屬性

例外狀況

infonull

備註

此建構子在反序列化過程中被呼叫,以重建透過串流傳輸的例外物件。 如需詳細資訊,請參閱System.Runtime.Serialization

InvalidOleVariantTypeException 繼承自 SystemException

適用於

InvalidOleVariantTypeException(String, Exception)

來源:
InvalidOleVariantTypeException.cs
來源:
InvalidOleVariantTypeException.cs
來源:
InvalidOleVariantTypeException.cs
來源:
InvalidOleVariantTypeException.cs
來源:
InvalidOleVariantTypeException.cs

初始化類別的新實例 InvalidOleVariantTypeException ,並附上指定的錯誤訊息及導致該異常的內部例外的參考。

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)

參數

message
String

錯誤訊息解釋了例外原因。

inner
Exception

該例外即為當前例外的原因。 若 inner 參數不 null為 ,則在處理內部異常的區塊中提出 catch 當前例外。

備註

因先前例外直接拋出的例外,應包含對該屬性中 InnerException 先前例外的參考。 該 InnerException 屬性回傳與傳入建構子相同的值,或 null 若該 InnerException 性質未提供內部例外值給建構子。

下表顯示了 的 InvalidOleVariantTypeException初始屬性值。

房產 價值
InnerException 內部例外的參考。
Message 錯誤訊息字串。

另請參閱

適用於