RuntimeHelpers.CleanupCode Delegate

 

Represents a method to run when an exception occurs.

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

type CleanupCode = 
    delegate of 
        userData:Object *
        exceptionThrown:bool -> unit

Parameters

userData
Type: System.Object

Data to pass to the delegate.

exceptionThrown
Type: System.Boolean

true to express that an exception was thrown; otherwise, false.

Use the RuntimeHelpers.CleanupCode delegate with the ExecuteCodeWithGuaranteedCleanup method.

.NET Framework
Available since 2.0
Return to top
Show: