Export (0) Print
Expand All
Expand Minimize

RuntimeHelpers.CleanupCode Delegate

Represents a method to run when an exception occurs.

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

public delegate void CleanupCode(
	Object userData,
	bool exceptionThrown
)

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

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft