NetworkInformationException Constructors

Definition

Initializes a new instance of the NetworkInformationException class.

Overloads

NetworkInformationException()

Initializes a new instance of the NetworkInformationException class.

NetworkInformationException(Int32)

Initializes a new instance of the NetworkInformationException class with the specified error code.

NetworkInformationException(SerializationInfo, StreamingContext)

Initializes a new instance of the NetworkInformationException class with serialized data.

NetworkInformationException()

Initializes a new instance of the NetworkInformationException class.

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

Remarks

This constructor sets the ErrorCode property to the most recent Win32 error.

NetworkInformationException(Int32)

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)

Parameters

errorCode
Int32

A Win32 error code.

Remarks

This constructor sets the value of the ErrorCode property to errorCode.

NetworkInformationException(SerializationInfo, StreamingContext)

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)

Parameters

serializationInfo
SerializationInfo

A SerializationInfo object that contains the serialized exception data.

streamingContext
StreamingContext

A StreamingContext that contains contextual information about the serialized exception.

Remarks

This constructor is used by the system to create a NetworkInformationException instance from serialized data.

Applies to