Partager via


AsyncEventHandler Delegate

Definition

An asynchronous event handler.

public delegate System::Threading::Tasks::Task ^ AsyncEventHandler(System::Object ^ sender, EventArgs ^ args);
public delegate System.Threading.Tasks.Task AsyncEventHandler(object sender, EventArgs args);
public delegate System.Threading.Tasks.Task AsyncEventHandler(object? sender, EventArgs args);
type AsyncEventHandler = delegate of obj * EventArgs -> Task
Public Delegate Function AsyncEventHandler(sender As Object, args As EventArgs) As Task 

Parameters

sender
Object

The sender of the event.

args
EventArgs

Event arguments.

Return Value

A task whose completion signals handling is finished.

Extension Methods

InvokeAsync(AsyncEventHandler, Object, EventArgs)

Invokes asynchronous event handlers, returning a task that completes when all event handlers have been invoked. Each handler is fully executed (including continuations) before the next handler in the list is invoked.

Applies to