SocketException.SocketErrorCode Proprietà

Definizione

Ottiene il codice errore associato a questa eccezione.

public System.Net.Sockets.SocketError SocketErrorCode { get; }

Valore della proprietà

Codice errore rappresentato da un numero intero associato a questa eccezione.

Commenti

La SocketErrorCode proprietà contiene il codice di errore associato all'errore che ha causato l'eccezione.

Il costruttore senza parametri per SocketException imposta la ErrorCode proprietà sull'ultimo errore del sistema operativo che si è verificato. Per altre informazioni sui codici di errore del socket, vedere la documentazione sul codice di errore dell'API Windows Sockets versione 2 .

Si applica a

Prodotto Versioni
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0