Marshal.GetExceptionCode Method ()

 

Retrieves a code that identifies the type of the exception that occurred.

Namespace:   System.Runtime.InteropServices
Assembly:  mscorlib (in mscorlib.dll)

<SecurityCriticalAttribute>
Public Shared Function GetExceptionCode As Integer

Return Value

Type: System.Int32

The type of the exception.

GetExceptionCode is exposed for compiler support of structured exception handling (SEH) only. If this method is called before an exception is thrown, it returns 0x0.

SecurityCriticalAttribute

requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Windows Phone
Available since 8.1
Return to top
Show: