SocketException Konstruktor

Definisi

Menginisialisasi instans baru kelas SocketException.

Overload

SocketException()

Menginisialisasi instans SocketException baru kelas dengan kode kesalahan sistem operasi terakhir.

SocketException(Int32)

Menginisialisasi instans SocketException baru kelas dengan kode kesalahan yang ditentukan.

SocketException(Int32, String)

Menginisialisasi instans SocketException baru kelas dengan kode kesalahan dan pesan yang ditentukan.

SocketException(SerializationInfo, StreamingContext)
Kedaluwarsa.

Menginisialisasi instans SocketException baru kelas dari instans SerializationInfo dan StreamingContext kelas yang ditentukan.

SocketException()

Sumber:
SocketException.Unix.cs
Sumber:
SocketException.Unix.cs
Sumber:
SocketException.Unix.cs

Menginisialisasi instans SocketException baru kelas dengan kode kesalahan sistem operasi terakhir.

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

Keterangan

SocketException Konstruktor mengatur ErrorCode properti ke kesalahan soket sistem operasi terakhir yang terjadi. Untuk informasi selengkapnya tentang kode kesalahan soket, lihat dokumentasi kode kesalahan WINDOWS Sockets versi 2 API .

Berlaku untuk

SocketException(Int32)

Sumber:
SocketException.cs
Sumber:
SocketException.cs
Sumber:
SocketException.cs

Menginisialisasi instans SocketException baru kelas dengan kode kesalahan yang ditentukan.

public:
 SocketException(int errorCode);
public SocketException (int errorCode);
new System.Net.Sockets.SocketException : int -> System.Net.Sockets.SocketException
Public Sub New (errorCode As Integer)

Parameter

errorCode
Int32

Kode kesalahan yang menunjukkan kesalahan yang terjadi.

Keterangan

SocketException Konstruktor mengatur properti ke ErrorCodeerrorCode.

Berlaku untuk

SocketException(Int32, String)

Sumber:
SocketException.cs
Sumber:
SocketException.cs

Menginisialisasi instans SocketException baru kelas dengan kode kesalahan dan pesan yang ditentukan.

public:
 SocketException(int errorCode, System::String ^ message);
public SocketException (int errorCode, string? message);
new System.Net.Sockets.SocketException : int * string -> System.Net.Sockets.SocketException
Public Sub New (errorCode As Integer, message As String)

Parameter

errorCode
Int32

Kode kesalahan yang menunjukkan kesalahan yang terjadi.

message
String

Pesan yang menjelaskan kesalahan.

Berlaku untuk

SocketException(SerializationInfo, StreamingContext)

Sumber:
SocketException.cs
Sumber:
SocketException.cs
Sumber:
SocketException.cs

Perhatian

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

Menginisialisasi instans SocketException baru kelas dari instans SerializationInfo dan StreamingContext kelas yang ditentukan.

protected:
 SocketException(System::Runtime::Serialization::SerializationInfo ^ serializationInfo, System::Runtime::Serialization::StreamingContext streamingContext);
protected SocketException (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 SocketException (System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);
new System.Net.Sockets.SocketException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Net.Sockets.SocketException
[<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.Sockets.SocketException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Net.Sockets.SocketException
Protected Sub New (serializationInfo As SerializationInfo, streamingContext As StreamingContext)

Parameter

serializationInfo
SerializationInfo

SerializationInfo Instans yang berisi informasi yang diperlukan untuk menserialisasikan instans baruSocketException.

streamingContext
StreamingContext

StreamingContext yang berisi sumber aliran berseri yang terkait dengan instans baruSocketException.

Atribut

Keterangan

Konstruktor ini mengimplementasikan ISerializable antarmuka untuk SocketException kelas .

Lihat juga

Berlaku untuk