NetworkInformationException 构造函数
定义
初始化 NetworkInformationException 类的新实例。Initializes a new instance of the NetworkInformationException class.
重载
| NetworkInformationException() |
初始化 NetworkInformationException 类的新实例。Initializes a new instance of the NetworkInformationException class. |
| NetworkInformationException(Int32) |
用指定的错误代码初始化 NetworkInformationException 类的新实例。Initializes a new instance of the NetworkInformationException class with the specified error code. |
| NetworkInformationException(SerializationInfo, StreamingContext) |
用序列化数据初始化 NetworkInformationException 类的新实例。Initializes a new instance of the NetworkInformationException class with serialized data. |
NetworkInformationException()
初始化 NetworkInformationException 类的新实例。Initializes a new instance of the NetworkInformationException class.
public:
NetworkInformationException();
public NetworkInformationException ();
Public Sub New ()
注解
此构造函数将 ErrorCode 属性设置为最近的 Win32 错误。This constructor sets the ErrorCode property to the most recent Win32 error.
适用于
NetworkInformationException(Int32)
用指定的错误代码初始化 NetworkInformationException 类的新实例。Initializes a new instance of the NetworkInformationException class with the specified error code.
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 错误代码。A Win32 error code.
注解
此构造函数将属性的值设置 ErrorCode 为 errorCode 。This constructor sets the value of the ErrorCode property to errorCode.
适用于
NetworkInformationException(SerializationInfo, StreamingContext)
用序列化数据初始化 NetworkInformationException 类的新实例。Initializes a new instance of the NetworkInformationException class with serialized data.
protected:
NetworkInformationException(System::Runtime::Serialization::SerializationInfo ^ serializationInfo, System::Runtime::Serialization::StreamingContext streamingContext);
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
Protected Sub New (serializationInfo As SerializationInfo, streamingContext As StreamingContext)
参数
- serializationInfo
- SerializationInfo
SerializationInfo 对象,包含序列化异常数据。A SerializationInfo object that contains the serialized exception data.
- streamingContext
- StreamingContext
StreamingContext,包含有关序列化异常的上下文信息。A StreamingContext that contains contextual information about the serialized exception.
注解
系统使用此构造函数 NetworkInformationException 从序列化数据创建实例。This constructor is used by the system to create a NetworkInformationException instance from serialized data.