PlatformNotSupportedException 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 PlatformNotSupportedException 類別的新執行個體。
多載
| 名稱 | Description |
|---|---|
| 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
the that 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
該例外即為當前例外的原因。 若 inner 參數不 null為 ,則在處理內部異常的區塊中提出 catch 當前例外。
備註
因先前例外直接拋出的例外,應包含對該屬性中 InnerException 先前例外的參考。 該 InnerException 屬性回傳與傳入建構子相同的值,或 null 若該 InnerException 性質未提供內部例外值給建構子。
下表顯示了 的 PlatformNotSupportedException初始屬性值。
| 房產 | 價值 |
|---|---|
| InnerException | 內部例外的參考。 |
| Message | 錯誤訊息字串。 |