SafeArrayTypeMismatchException 构造函数

定义

初始化 SafeArrayTypeMismatchException 类的新实例。

重载

SafeArrayTypeMismatchException()

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

SafeArrayTypeMismatchException(String)

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

SafeArrayTypeMismatchException(SerializationInfo, StreamingContext)
已过时.

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

SafeArrayTypeMismatchException(String, Exception)

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

SafeArrayTypeMismatchException()

Source:
SafeArrayTypeMismatchException.cs
Source:
SafeArrayTypeMismatchException.cs
Source:
SafeArrayTypeMismatchException.cs

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

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

注解

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

properties
InnerException null.
Message 本地化的错误消息字符串。

适用于

SafeArrayTypeMismatchException(String)

Source:
SafeArrayTypeMismatchException.cs
Source:
SafeArrayTypeMismatchException.cs
Source:
SafeArrayTypeMismatchException.cs

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

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

参数

message
String

指示异常原因的消息。

注解

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

properties
InnerException null.
Message message

适用于

SafeArrayTypeMismatchException(SerializationInfo, StreamingContext)

Source:
SafeArrayTypeMismatchException.cs
Source:
SafeArrayTypeMismatchException.cs
Source:
SafeArrayTypeMismatchException.cs

注意

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

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

protected:
 SafeArrayTypeMismatchException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected SafeArrayTypeMismatchException (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 SafeArrayTypeMismatchException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new System.Runtime.InteropServices.SafeArrayTypeMismatchException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Runtime.InteropServices.SafeArrayTypeMismatchException
[<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.SafeArrayTypeMismatchException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Runtime.InteropServices.SafeArrayTypeMismatchException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

参数

info
SerializationInfo

承载序列化对象数据的对象。

context
StreamingContext

关于来源和目标的上下文信息

属性

例外

info 上声明的默认值为 null

注解

在反序列化期间调用此构造函数以重新构造在流上传输的异常对象。 有关详细信息,请参阅 System.Runtime.Serialization

SafeArrayTypeMismatchExceptionSystemException 继承。

适用于

SafeArrayTypeMismatchException(String, Exception)

Source:
SafeArrayTypeMismatchException.cs
Source:
SafeArrayTypeMismatchException.cs
Source:
SafeArrayTypeMismatchException.cs

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

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

参数

message
String

解释异常原因的错误消息。

inner
Exception

导致当前异常的异常。 如果 inner 参数不为 null,则当前异常将在处理内部异常的 catch 块中引发。

注解

因前一个异常而直接引发的异常应在 InnerException 属性中包含对前一个异常的引用。 InnerException 属性将返回传递给构造函数的同一值;如果 InnerException 属性不向构造函数提供内部异常值,则返回 null

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

properties “值”
InnerException 内部异常引用。
Message 错误消息字符串。

另请参阅

适用于