RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup メソッド

定義

別のDelegateを使用して例外が発生した場合に追加のコードを実行するときに、Delegateを使用してコードを実行します。

public:
 static void ExecuteCodeWithGuaranteedCleanup(System::Runtime::CompilerServices::RuntimeHelpers::TryCode ^ code, System::Runtime::CompilerServices::RuntimeHelpers::CleanupCode ^ backoutCode, System::Object ^ userData);
public static void ExecuteCodeWithGuaranteedCleanup(System.Runtime.CompilerServices.RuntimeHelpers.TryCode code, System.Runtime.CompilerServices.RuntimeHelpers.CleanupCode backoutCode, object userData);
[System.Security.SecurityCritical]
public static void ExecuteCodeWithGuaranteedCleanup(System.Runtime.CompilerServices.RuntimeHelpers.TryCode code, System.Runtime.CompilerServices.RuntimeHelpers.CleanupCode backoutCode, object userData);
static member ExecuteCodeWithGuaranteedCleanup : System.Runtime.CompilerServices.RuntimeHelpers.TryCode * System.Runtime.CompilerServices.RuntimeHelpers.CleanupCode * obj -> unit
[<System.Security.SecurityCritical>]
static member ExecuteCodeWithGuaranteedCleanup : System.Runtime.CompilerServices.RuntimeHelpers.TryCode * System.Runtime.CompilerServices.RuntimeHelpers.CleanupCode * obj -> unit
Public Shared Sub ExecuteCodeWithGuaranteedCleanup (code As RuntimeHelpers.TryCode, backoutCode As RuntimeHelpers.CleanupCode, userData As Object)

パラメーター

code
RuntimeHelpers.TryCode

試行するコードへのデリゲート。

backoutCode
RuntimeHelpers.CleanupCode

例外が発生した場合に実行するコードへのデリゲート。

userData
Object

codeおよびbackoutCodeに渡すデータ。

属性

注釈

このメソッドはコンパイラによって使用されます。

適用対象