RuntimeHelpers.CleanupCode 代理人

定義

表示發生例外狀況時要執行的方法。

public: delegate void RuntimeHelpers::CleanupCode(System::Object ^ userData, bool exceptionThrown);
public delegate void RuntimeHelpers.CleanupCode(object? userData, bool exceptionThrown);
[System.Security.SecurityCritical]
public delegate void RuntimeHelpers.CleanupCode(object userData, bool exceptionThrown);
public delegate void RuntimeHelpers.CleanupCode(object userData, bool exceptionThrown);
type RuntimeHelpers.CleanupCode = delegate of obj * bool -> unit
[<System.Security.SecurityCritical>]
type RuntimeHelpers.CleanupCode = delegate of obj * bool -> unit
Public Delegate Sub RuntimeHelpers.CleanupCode(userData As Object, exceptionThrown As Boolean)

參數

userData
Object

要傳遞至委派的資料。

exceptionThrown
Boolean

true 表示已擲回例外狀況,否則為 false

屬性

備註

搭配 方法使用 RuntimeHelpers.CleanupCode 委派 ExecuteCodeWithGuaranteedCleanup

擴充方法

GetMethodInfo(Delegate)

取得表示特定委派所代表之方法的物件。

適用於