共用方式為


NetworkInformationException 建構函式

定義

初始化 NetworkInformationException 類別的新執行個體。

多載

NetworkInformationException()

初始化 NetworkInformationException 類別的新執行個體。

NetworkInformationException(Int32)

使用指定的錯誤碼,初始化 NetworkInformationException 類別的新執行個體。

NetworkInformationException(SerializationInfo, StreamingContext)
已淘汰.

使用序列化資料,初始化 NetworkInformationException 類別的新執行個體。

NetworkInformationException()

來源:
NetworkInformationException.cs
來源:
NetworkInformationException.cs
來源:
NetworkInformationException.cs

初始化 NetworkInformationException 類別的新執行個體。

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

備註

這個建構函式會將 ErrorCode 屬性設定為最新的 Win32 錯誤。

適用於

NetworkInformationException(Int32)

來源:
NetworkInformationException.cs
來源:
NetworkInformationException.cs
來源:
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)

來源:
NetworkInformationException.cs
來源:
NetworkInformationException.cs
來源:
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 實例。

適用於