通过


PingException 构造函数

定义

初始化 PingException 类的新实例。

重载

名称 说明
PingException(String)

使用指定的消息初始化类的新实例 PingException

PingException(SerializationInfo, StreamingContext)
已过时.

使用序列化数据初始化类的新实例 PingException

PingException(String, Exception)

使用指定的消息和内部异常初始化类的新实例 PingException

PingException(String)

Source:
PingException.cs
Source:
PingException.cs
Source:
PingException.cs
Source:
PingException.cs
Source:
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

描述错误的 A String

注解

此构造函数使用参数中的message文本初始化Message属性。 InnerException 属性设置为 null

适用于

PingException(SerializationInfo, StreamingContext)

Source:
PingException.cs
Source:
PingException.cs
Source:
PingException.cs
Source:
PingException.cs
Source:
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);
[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);
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}")>]
new System.Net.NetworkInformation.PingException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Net.NetworkInformation.PingException
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 ,指定有关此序列化的源或目标的上下文信息。

属性

注解

在反序列化期间调用此构造函数以重建以前序列化 PingException 的对象。

适用于

PingException(String, Exception)

Source:
PingException.cs
Source:
PingException.cs
Source:
PingException.cs
Source:
PingException.cs
Source:
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

描述错误的 A String

innerException
Exception

导致当前异常的异常。

注解

此构造函数使用参数中的message文本和InnerException具有参数的属性初始化Message属性innerException

适用于