PingException 建構函式

定義

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

多載

PingException(String)

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

PingException(SerializationInfo, StreamingContext)
已淘汰.

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

PingException(String, Exception)

使用指定的訊息和內部例外狀況,初始化 PingException 類別的新執行個體。

PingException(String)

來源:
PingException.cs
來源:
PingException.cs
來源:
PingException.cs

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

public:
 PingException(System::String ^ message);
public PingException (string? message);
public PingException (string message);
new System.Net.NetworkInformation.PingException : string -> System.Net.NetworkInformation.PingException
Public Sub New (message As String)

參數

message
String

描述錯誤的 String

備註

這個建構函式會使用 參數中的 message 文字初始化 Message 屬性。 InnerException 屬性會設定為 null

適用於

PingException(SerializationInfo, StreamingContext)

來源:
PingException.cs
來源:
PingException.cs
來源:
PingException.cs

警告

This API supports obsolete formatter-based serialization. It should not be called or extended by application code.

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

protected:
 PingException(System::Runtime::Serialization::SerializationInfo ^ serializationInfo, System::Runtime::Serialization::StreamingContext streamingContext);
protected PingException (System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);
[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 PingException (System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);
new System.Net.NetworkInformation.PingException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Net.NetworkInformation.PingException
[<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 System.Net.NetworkInformation.PingException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Net.NetworkInformation.PingException
Protected Sub New (serializationInfo As SerializationInfo, streamingContext As StreamingContext)

參數

serializationInfo
SerializationInfo

存放序列物件資料的物件。

streamingContext
StreamingContext

StreamingContext,指定這個序列化 (Serialization) 之來源或目的端的相關內容資訊。

屬性

備註

還原序列化期間會呼叫這個建構函式,以重新建構先前序列化 PingException 的物件。

適用於

PingException(String, Exception)

來源:
PingException.cs
來源:
PingException.cs
來源:
PingException.cs

使用指定的訊息和內部例外狀況,初始化 PingException 類別的新執行個體。

public:
 PingException(System::String ^ message, Exception ^ innerException);
public PingException (string? message, Exception? innerException);
public PingException (string message, Exception innerException);
new System.Net.NetworkInformation.PingException : string * Exception -> System.Net.NetworkInformation.PingException
Public Sub New (message As String, innerException As Exception)

參數

message
String

描述錯誤的 String

innerException
Exception

造成目前例外狀況的例外狀況。

備註

這個建構函 Message 式會使用 參數中的 message 文字初始化 屬性,並使用 參數初始化 InnerExceptioninnerException 屬性。

適用於