PingException 构造函数 
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 PingException 类的新实例。
重载
| PingException(String) | 使用指定的消息初始化 PingException 类的新实例。 | 
| PingException(SerializationInfo, StreamingContext) | 
		已过时.
	 用序列化数据初始化 PingException 类的新实例。 | 
| PingException(String, Exception) | 使用指定的消息和内部异常初始化 PingException 类的新实例。 | 
PingException(String)
- 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.PingExceptionPublic Sub New (message As String)参数
注解
此构造函数使用 参数中的message文本初始化 Message 属性。 将 InnerException 属性设置为 null。
适用于
PingException(SerializationInfo, StreamingContext)
- 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);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.PingExceptionProtected 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
使用指定的消息和内部异常初始化 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.PingExceptionPublic Sub New (message As String, innerException As Exception)参数
- innerException
- Exception
引发当前异常的异常。
注解
此构造函数使用 参数中的message文本初始化 属性,使用 innerExceptionInnerException 参数初始化 Message 属性。