Export (0) Print
Expand All

SocketException.ErrorCode Property

Gets the error code associated with this exception.

[Visual Basic]
Overrides Public ReadOnly Property ErrorCode As Integer
[C#]
public override int ErrorCode {get;}
[C++]
public: __property int get_ErrorCode();
[JScript]
public override function get ErrorCode() : int;

Property Value

An integer error code associated with this exception.

Remarks

The ErrorCode property contains the error code 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 Socket Version 2 API error code documentation in MSDN.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

SocketException Class | SocketException Members | System.Net.Sockets Namespace

Show:
© 2015 Microsoft