Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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
Available since 2.0
Return to top
Show:
© 2017 Microsoft