ערוך

שתף באמצעות


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)
Obsolete.

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

NetworkInformationException()

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

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)

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

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)

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

Caution

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

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);
[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)

Parameters

serializationInfo
SerializationInfo

A SerializationInfo object that contains the serialized exception data.

streamingContext
StreamingContext

A StreamingContext that contains contextual information about the serialized exception.

Attributes

Remarks

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

Applies to