Share via


SocketException.ErrorCode Property

Gets the error code that is associated with the current exception.

Namespace: System.Net.Sockets
Assembly: System (in system.dll)

Syntax

public int ErrorCode { get; }

Property Value

A numeric value indicating the error that is associated with the current exception.

Remarks

The default constructor for the SocketException class sets the ErrorCode property to the last network error that occurred. For more information about socket error codes, see the Windows® Sockets 2.0 API error code documentation in the MSDN® Library.

Version Information

Available in .NET Micro Framework version 2.0, 2.5

See Also

Reference

SocketException Class
SocketException Members
System.Net.Sockets Namespace