RuntimeHelpers.CleanupCode Delegado

Definición

Representa un método para ejecutar cuando se produce una excepción.Represents a method to run when an exception occurs.

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)

Parámetros

userData
Object

Datos que se van a pasar al delegado.Data to pass to the delegate.

exceptionThrown
Boolean

true para expresar que se produjo una excepción; de lo contrario, false.true to express that an exception was thrown; otherwise, false.

Atributos

Comentarios

Use el RuntimeHelpers.CleanupCode delegado con el ExecuteCodeWithGuaranteedCleanup método.Use the RuntimeHelpers.CleanupCode delegate with the ExecuteCodeWithGuaranteedCleanup method.

Métodos de extensión

GetMethodInfo(Delegate)

Obtiene un objeto que representa el método representado por el delegado especificado.Gets an object that represents the method represented by the specified delegate.

Se aplica a