通过


InvalidOleVariantTypeException 构造函数

定义

初始化 InvalidOleVariantTypeException 类的新实例。

重载

名称 说明
InvalidOleVariantTypeException()

使用默认值初始化 InvalidOleVariantTypeException 类的新实例。

InvalidOleVariantTypeException(String)

使用指定的消息初始化类的新实例 InvalidOleVariantTypeException

InvalidOleVariantTypeException(SerializationInfo, StreamingContext)
已过时.

从序列化数据初始化类的新实例 InvalidOleVariantTypeException

InvalidOleVariantTypeException(String, Exception)

使用指定的错误消息和对作为此异常原因的内部异常的引用初始化类的新实例 InvalidOleVariantTypeException

InvalidOleVariantTypeException()

Source:
InvalidOleVariantTypeException.cs
Source:
InvalidOleVariantTypeException.cs
Source:
InvalidOleVariantTypeException.cs
Source:
InvalidOleVariantTypeException.cs
Source:
InvalidOleVariantTypeException.cs

使用默认值初始化 InvalidOleVariantTypeException 类的新实例。

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

注解

InvalidOleVariantTypeException 继承自 SystemException. 此构造函数设置对象的属性 Exception ,如下表所示。

财产 价值
InnerException null
Message 本地化的错误消息字符串。

适用于

InvalidOleVariantTypeException(String)

Source:
InvalidOleVariantTypeException.cs
Source:
InvalidOleVariantTypeException.cs
Source:
InvalidOleVariantTypeException.cs
Source:
InvalidOleVariantTypeException.cs
Source:
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)

Source:
InvalidOleVariantTypeException.cs
Source:
InvalidOleVariantTypeException.cs
Source:
InvalidOleVariantTypeException.cs
Source:
InvalidOleVariantTypeException.cs
Source:
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)

Source:
InvalidOleVariantTypeException.cs
Source:
InvalidOleVariantTypeException.cs
Source:
InvalidOleVariantTypeException.cs
Source:
InvalidOleVariantTypeException.cs
Source:
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 属性返回传入构造函数的相同值,或者 nullInnerException 属性未向构造函数提供内部异常值。

下表显示了实例 InvalidOleVariantTypeException的初始属性值。

财产 价值
InnerException 内部异常引用。
Message 错误消息字符串。

另请参阅

适用于