PlatformNotSupportedException 构造函数

定义

初始化 PlatformNotSupportedException 类的新实例。

重载

PlatformNotSupportedException()

使用默认属性初始化 PlatformNotSupportedException 类的新实例。

PlatformNotSupportedException(String)

用指定的错误消息初始化 PlatformNotSupportedException 类的新实例。

PlatformNotSupportedException(SerializationInfo, StreamingContext)
已过时.

用序列化数据初始化 PlatformNotSupportedException 类的新实例。

PlatformNotSupportedException(String, Exception)

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

PlatformNotSupportedException()

Source:
PlatformNotSupportedException.cs
Source:
PlatformNotSupportedException.cs
Source:
PlatformNotSupportedException.cs

使用默认属性初始化 PlatformNotSupportedException 类的新实例。

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

注解

通过调用此构造函数创建 类的 PlatformNotSupportedException 实例时,以下属性将初始化为指定的值:

properties
InnerException null.
Message 空字符串。

适用于

PlatformNotSupportedException(String)

Source:
PlatformNotSupportedException.cs
Source:
PlatformNotSupportedException.cs
Source:
PlatformNotSupportedException.cs

用指定的错误消息初始化 PlatformNotSupportedException 类的新实例。

public:
 PlatformNotSupportedException(System::String ^ message);
public PlatformNotSupportedException (string message);
public PlatformNotSupportedException (string? message);
new PlatformNotSupportedException : string -> PlatformNotSupportedException
Public Sub New (message As String)

参数

message
String

解释异常原因的文本消息。

注解

通过调用此构造函数创建 类的 PlatformNotSupportedException 实例时,以下属性将初始化为指定的值:

properties
InnerException null.
Message 错误消息字符串。

适用于

PlatformNotSupportedException(SerializationInfo, StreamingContext)

Source:
PlatformNotSupportedException.cs
Source:
PlatformNotSupportedException.cs
Source:
PlatformNotSupportedException.cs

注意

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

用序列化数据初始化 PlatformNotSupportedException 类的新实例。

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

参数

info
SerializationInfo

包含有关所引发异常的序列化对象数据的 SerializationInfo

context
StreamingContext

StreamingContext,它包含关于源或目标的上下文信息。

属性

适用于

PlatformNotSupportedException(String, Exception)

Source:
PlatformNotSupportedException.cs
Source:
PlatformNotSupportedException.cs
Source:
PlatformNotSupportedException.cs

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

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

参数

message
String

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

inner
Exception

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

注解

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

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

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

适用于