PlatformNotSupportedException 建構函式

定義

初始化 PlatformNotSupportedException 類別的新執行個體。Initializes a new instance of the PlatformNotSupportedException class.

多載

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 ()

備註

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)

參數

message
String

文字訊息,說明例外狀況的原因。The text message that explains the reason for the exception.

備註

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)

參數

info
SerializationInfo

SerializationInfo,包含所擲回之例外狀況的相關序列化物件資料。The 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)

參數

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.

備註

被擲回以做為前一個例外狀況直接結果的例外狀況,應該在 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 屬性會傳回與傳入建構函式中相同的值;如果 null 屬性沒有提供內部例外值給建構函式,則傳回 InnerExceptionThe 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.

適用於