PlatformNotSupportedException Constructors

Definition

初始化 PlatformNotSupportedException 类的新实例。Initializes a new instance of the PlatformNotSupportedException class.

Overloads

PlatformNotSupportedException()

使用默认属性初始化 PlatformNotSupportedException 类的新实例。Initializes a new instance of the PlatformNotSupportedException class with default properties.

PlatformNotSupportedException(String)

用指定的错误消息初始化 PlatformNotSupportedException 类的新实例。Initializes a new instance of the PlatformNotSupportedException class with a specified error message.

PlatformNotSupportedException(SerializationInfo, StreamingContext)

使用序列化数据初始化 PlatformNotSupportedException 类的新实例。Initializes a new instance of the PlatformNotSupportedException class with serialized data.

PlatformNotSupportedException(String, Exception)

使用指定的错误消息和对作为此异常原因的内部异常的引用来初始化 PlatformNotSupportedException 类的新实例。Initializes a new instance of the PlatformNotSupportedException class with a specified error message and a reference to the inner exception that is the cause of this exception.

PlatformNotSupportedException()

使用默认属性初始化 PlatformNotSupportedException 类的新实例。Initializes a new instance of the PlatformNotSupportedException class with default properties.

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

Remarks

当通过调用此构造函数创建 PlatformNotSupportedException 类的实例时,以下属性将初始化为指定的值:When an instance of the PlatformNotSupportedException class is created by a call to this constructor, the following properties are initialized to the specified values:

属性Property Value
InnerException null 列中的一个值匹配。null.
Message 空字符串。The empty string.

PlatformNotSupportedException(String)

用指定的错误消息初始化 PlatformNotSupportedException 类的新实例。Initializes a new instance of the PlatformNotSupportedException class with a specified error message.

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

Parameters

message
String

解释异常原因的文本消息。The text message that explains the reason for the exception.

Remarks

当通过调用此构造函数创建 PlatformNotSupportedException 类的实例时,以下属性将初始化为指定的值:When an instance of the PlatformNotSupportedException class is created by a call to this constructor, the following properties are initialized to the specified values:

属性Property Value
InnerException null 列中的一个值匹配。null.
Message 错误消息字符串。The error message string.

PlatformNotSupportedException(SerializationInfo, StreamingContext)

使用序列化数据初始化 PlatformNotSupportedException 类的新实例。Initializes a new instance of the PlatformNotSupportedException class with serialized data.

protected:
 PlatformNotSupportedException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected PlatformNotSupportedException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new PlatformNotSupportedException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> PlatformNotSupportedException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

Parameters

info
SerializationInfo

包含有关所引发异常的序列化对象数据的 SerializationInfoThe SerializationInfo that holds the serialized object data about the exception being thrown.

context
StreamingContext

包含有关源或目标的上下文信息的 StreamingContextThe StreamingContext that contains contextual information about the source or destination.

PlatformNotSupportedException(String, Exception)

使用指定的错误消息和对作为此异常原因的内部异常的引用来初始化 PlatformNotSupportedException 类的新实例。Initializes a new instance of the PlatformNotSupportedException class with a specified error message and a reference to the inner exception that is the cause of this exception.

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

Parameters

message
String

用于解释异常原因的错误消息。The error message that explains the reason for the exception.

inner
Exception

引起当前异常的异常。The exception that is the cause of the current exception. 如果 inner 参数不为 null,则当前异常将在处理内部异常的 catch 块中引发。If the inner parameter is not null, the current exception is raised in a catch block that handles the inner exception.

Remarks

作为前一个异常的直接结果引发的异常应在 InnerException 属性中包含对前一个异常的引用。An exception that is thrown as a direct result of a previous exception should include a reference to the previous exception in the InnerException property. InnerException 属性将返回传递给构造函数的同一值;如果 InnerException 属性不向构造函数提供内部异常值,则返回 nullThe InnerException property returns the same value that is passed into the constructor, or null if the InnerException property does not supply the inner exception value to the constructor.

下表显示了 PlatformNotSupportedException 实例的初始属性值。The following table shows the initial property values for an instance of PlatformNotSupportedException.

属性Property Value
InnerException 内部异常引用。The inner exception reference.
Message 错误消息字符串。The error message string.

Applies to