PlatformNotSupportedException 建構函式

定義

初始化 PlatformNotSupportedException 類別的新執行個體。

多載

PlatformNotSupportedException()

使用預設屬性,初始化 PlatformNotSupportedException 類別的新執行個體。

PlatformNotSupportedException(String)

使用指定的錯誤訊息,初始化 PlatformNotSupportedException 類別的新執行個體。

PlatformNotSupportedException(SerializationInfo, StreamingContext)
已淘汰.

使用序列化資料,初始化 PlatformNotSupportedException 類別的新執行個體。

PlatformNotSupportedException(String, Exception)

使用指定的錯誤訊息以及造成此例外狀況的內部例外狀況的參考,初始化 PlatformNotSupportedException 類別的新執行個體。

PlatformNotSupportedException()

來源:
PlatformNotSupportedException.cs
來源:
PlatformNotSupportedException.cs
來源:
PlatformNotSupportedException.cs

使用預設屬性,初始化 PlatformNotSupportedException 類別的新執行個體。

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

備註

當呼叫這個建構函式建立 類別的 PlatformNotSupportedException 實例時,下列屬性會初始化為指定的值:

屬性
InnerException null.
Message 空字串。

適用於

PlatformNotSupportedException(String)

來源:
PlatformNotSupportedException.cs
來源:
PlatformNotSupportedException.cs
來源:
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 實例時,下列屬性會初始化為指定的值:

屬性
InnerException null.
Message 錯誤訊息字串。

適用於

PlatformNotSupportedException(SerializationInfo, StreamingContext)

來源:
PlatformNotSupportedException.cs
來源:
PlatformNotSupportedException.cs
來源:
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)

來源:
PlatformNotSupportedException.cs
來源:
PlatformNotSupportedException.cs
來源:
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 屬性傳回的值會與傳入建構函式的值相同,或傳回 null (如果 InnerException 屬性未提供內部例外狀況值給建構函式)。

下表顯示 PlatformNotSupportedException 執行個體的初始屬性值。

屬性
InnerException 內部例外狀況參考。
Message 錯誤訊息字串。

適用於