Export (0) Print
Expand All

SocketException.ErrorCode Property

Gets the error code that is associated with this exception.

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

abstract ErrorCode : int with get 
override ErrorCode : int with get

Property Value

Type: System.Int32
An integer error code that is associated with this exception.

The ErrorCode property contains the error code that is associated with the error that caused the exception.

The default constructor for SocketException sets the ErrorCode property to the last operating system error that occurred. For more information about socket error codes, see the Windows Sockets version 2 API error code documentation in MSDN.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Supported in: Windows Phone 8.1

Supported in: Windows Phone Silverlight 8.1

Supported in: Windows Phone Silverlight 8
Show:
© 2015 Microsoft