RuntimeHelpers.CleanupCode Delegate

 

Represents a method to run when an exception occurs.

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

Public Delegate Sub CleanupCode (
	userData As Object,
	exceptionThrown As Boolean
)

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: