RuntimeHelpers.CleanupCode RuntimeHelpers.CleanupCode RuntimeHelpers.CleanupCode RuntimeHelpers.CleanupCode Delegate

Definition

Represents a method to run when an exception occurs.

public: delegate void RuntimeHelpers::CleanupCode(System::Object ^ userData, bool exceptionThrown);
[System.Security.SecurityCritical]
public delegate void RuntimeHelpers.CleanupCode(object userData, bool exceptionThrown);
type RuntimeHelpers.CleanupCode = delegate of obj * bool -> unit
Public Delegate Sub RuntimeHelpers.CleanupCode(userData As Object, exceptionThrown As Boolean)

Parameters

userData
Object Object Object Object

Data to pass to the delegate.

exceptionThrown
Boolean Boolean Boolean Boolean

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

Inheritance
RuntimeHelpers.CleanupCodeRuntimeHelpers.CleanupCodeRuntimeHelpers.CleanupCodeRuntimeHelpers.CleanupCode
Attributes

Remarks

Use the RuntimeHelpers.CleanupCode delegate with the ExecuteCodeWithGuaranteedCleanup method.

Extension Methods

GetMethodInfo(Delegate) GetMethodInfo(Delegate) GetMethodInfo(Delegate) GetMethodInfo(Delegate)

Gets an object that represents the method represented by the specified delegate.

Applies to