System.Runtime.InteropServices.Marshal.GetExceptionCode Method

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

Syntax

public static int GetExceptionCode ()

Returns

The type of the exception.

Remarks

Marshal.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.

Requirements

Namespace: System.Runtime.InteropServices
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0