NetworkInformationException 构造函数

定义

初始化 NetworkInformationException 类的新实例。

重载

NetworkInformationException()

初始化 NetworkInformationException 类的新实例。

NetworkInformationException(Int32)

用指定的错误代码初始化 NetworkInformationException 类的新实例。

NetworkInformationException(SerializationInfo, StreamingContext)
已过时.

用序列化数据初始化 NetworkInformationException 类的新实例。

NetworkInformationException()

Source:
NetworkInformationException.cs
Source:
NetworkInformationException.cs
Source:
NetworkInformationException.cs

初始化 NetworkInformationException 类的新实例。

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

注解

此构造函数将 ErrorCode 属性设置为最新的 Win32 错误。

适用于

NetworkInformationException(Int32)

Source:
NetworkInformationException.cs
Source:
NetworkInformationException.cs
Source:
NetworkInformationException.cs

用指定的错误代码初始化 NetworkInformationException 类的新实例。

public:
 NetworkInformationException(int errorCode);
public NetworkInformationException (int errorCode);
new System.Net.NetworkInformation.NetworkInformationException : int -> System.Net.NetworkInformation.NetworkInformationException
Public Sub New (errorCode As Integer)

参数

errorCode
Int32

Win32 错误代码。

注解

此构造函数将 属性的值 ErrorCode 设置为 errorCode

适用于

NetworkInformationException(SerializationInfo, StreamingContext)

Source:
NetworkInformationException.cs
Source:
NetworkInformationException.cs
Source:
NetworkInformationException.cs

注意

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

用序列化数据初始化 NetworkInformationException 类的新实例。

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

参数

serializationInfo
SerializationInfo

SerializationInfo 对象,包含序列化异常数据。

streamingContext
StreamingContext

StreamingContext,包含有关序列化异常的上下文信息。

属性

注解

系统使用此构造函数根据序列化数据创建 NetworkInformationException 实例。

适用于