PlatformNotSupportedException 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 PlatformNotSupportedException 类的新实例。
重载
| 名称 | 说明 |
|---|---|
| PlatformNotSupportedException() |
使用默认属性初始化类的新实例 PlatformNotSupportedException 。 |
| PlatformNotSupportedException(String) |
使用指定的错误消息初始化类的新实例 PlatformNotSupportedException 。 |
| PlatformNotSupportedException(SerializationInfo, StreamingContext) |
已过时.
使用序列化数据初始化类的新实例 PlatformNotSupportedException 。 |
| PlatformNotSupportedException(String, Exception) |
使用指定的错误消息和对作为此异常原因的内部异常的引用初始化类的新实例 PlatformNotSupportedException 。 |
PlatformNotSupportedException()
使用默认属性初始化类的新实例 PlatformNotSupportedException 。
public:
PlatformNotSupportedException();
public PlatformNotSupportedException();
Public Sub New ()
注解
当通过对此构造函数的调用创建类的 PlatformNotSupportedException 实例时,以下属性将初始化为指定的值:
| 财产 | 价值 |
|---|---|
| InnerException |
null。 |
| Message | 空字符串。 |
适用于
PlatformNotSupportedException(String)
使用指定的错误消息初始化类的新实例 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 实例时,以下属性将初始化为指定的值:
| 财产 | 价值 |
|---|---|
| InnerException |
null。 |
| Message | 错误消息字符串。 |
适用于
PlatformNotSupportedException(SerializationInfo, StreamingContext)
注意
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);
[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);
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}")>]
new PlatformNotSupportedException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> PlatformNotSupportedException
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)
使用指定的错误消息和对作为此异常原因的内部异常的引用初始化类的新实例 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
是当前异常原因的异常。 如果未 innernull 参数,则会在处理内部异常的 catch 块中引发当前异常。
注解
作为上一个异常的直接结果引发的异常应包括对 InnerException 属性中上一个异常的引用。
InnerException 属性返回传入构造函数的相同值,或者如果 null 属性未向构造函数提供内部异常值,则返回 InnerException。
下表显示了 PlatformNotSupportedException实例的初始属性值。
| 财产 | 价值 |
|---|---|
| InnerException | 内部异常引用。 |
| Message | 错误消息字符串。 |