NetworkInformationException Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
Applies to
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.
Applies to
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.