RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup Metodo

Definizione

Esegue il codice usando un'altra DelegateDelegate classe per eseguire codice aggiuntivo in caso di eccezione.

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)

Parametri

code
RuntimeHelpers.TryCode

Delegato al codice da provare.

backoutCode
RuntimeHelpers.CleanupCode

Delegato al codice da eseguire se si verifica un'eccezione.

userData
Object

Dati da passare a code e backoutCode.

Attributi

Commenti

Questo metodo viene usato dai compilatori.

Si applica a