SocketException Construtores

Definição

Inicializa uma nova instância da classe SocketException.Initializes a new instance of the SocketException class.

Sobrecargas

SocketException()

Inicializa uma nova instância da classe SocketException com o último código de erro do sistema operacional.Initializes a new instance of the SocketException class with the last operating system error code.

SocketException(Int32)

Inicializa uma nova instância da classe SocketException com o código de erro especificado.Initializes a new instance of the SocketException class with the specified error code.

SocketException(SerializationInfo, StreamingContext)

Inicializa uma nova instância da classe SocketException das instâncias especificadas das classes SerializationInfo e StreamingContext.Initializes a new instance of the SocketException class from the specified instances of the SerializationInfo and StreamingContext classes.

SocketException()

Inicializa uma nova instância da classe SocketException com o último código de erro do sistema operacional.Initializes a new instance of the SocketException class with the last operating system error code.

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

Comentários

O SocketException construtor define a ErrorCode propriedade para o último erro de soquete do sistema operacional que ocorreu.The SocketException constructor sets the ErrorCode property to the last operating system socket error that occurred. Para obter mais informações sobre códigos de erro de soquete, consulte a documentação do código de erro da API do Windows Sockets versão 2 .For more information about socket error codes, see the Windows Sockets version 2 API error code documentation.

Aplica-se a

SocketException(Int32)

Inicializa uma nova instância da classe SocketException com o código de erro especificado.Initializes a new instance of the SocketException class with the specified error code.

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

Parâmetros

errorCode
Int32

O código de erro que indica o erro que ocorreu.The error code that indicates the error that occurred.

Comentários

O SocketException construtor define a ErrorCode propriedade como errorCode .The SocketException constructor sets the ErrorCode property to errorCode.

Aplica-se a

SocketException(SerializationInfo, StreamingContext)

Inicializa uma nova instância da classe SocketException das instâncias especificadas das classes SerializationInfo e StreamingContext.Initializes a new instance of the SocketException class from the specified instances of the SerializationInfo and StreamingContext classes.

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

Parâmetros

serializationInfo
SerializationInfo

Uma instância SerializationInfo que contém as informações necessárias para serializar a nova instância SocketException.A SerializationInfo instance that contains the information that is required to serialize the new SocketException instance.

streamingContext
StreamingContext

Um StreamingContext que contém a origem do fluxo serializado associado à nova instância SocketException.A StreamingContext that contains the source of the serialized stream that is associated with the new SocketException instance.

Comentários

Esse construtor implementa a ISerializable interface para a SocketException classe.This constructor implements the ISerializable interface for the SocketException class.

Aplica-se a