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::ExecuteCodeWithGuaranteedCleanup Method (RuntimeHelpers::TryCode^, RuntimeHelpers::CleanupCode^, Object^)
.NET Framework (current version)
Executes code using a Delegate while using another Delegate to execute additional code in case of an exception.
Assembly: mscorlib (in mscorlib.dll)
public: [SecurityCriticalAttribute] static void ExecuteCodeWithGuaranteedCleanup( RuntimeHelpers::TryCode^ code, RuntimeHelpers::CleanupCode^ backoutCode, Object^ userData )
Parameters
- code
-
Type:
System.Runtime.CompilerServices::RuntimeHelpers::TryCode^
A delegate to the code to try.
- backoutCode
-
Type:
System.Runtime.CompilerServices::RuntimeHelpers::CleanupCode^
A delegate to the code to run if an exception occurs.
- userData
-
Type:
System::Object^
The data to pass to code and backoutCode.
This method is used by compilers.
SecurityCriticalAttribute
requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.
.NET Framework
Available since 2.0
Available since 2.0
Show: