Main Content

BeginInvoke

Initiate asynchronous .NET delegate call

    Description

    result = BeginInvoke(arg1,...,argN,callback,object) initiates asynchronous call to a .NET delegate for Microsoft® .NET Framework applications. You must call EndInvoke to complete the asynchronous call. For information about calling synchronous methods asynchronously, refer to Microsoft .NET documentation.

    Note

    For applications using .NET Framework 4.0 and higher, including .NET 5 and .NET Core and later versions, use task-based APIs such as System.Threading.Tasks. For more information, see the Microsoft article Task-based asynchronous pattern (TAP) in .NET.

    Input Arguments

    collapse all

    Input arguments 1 through N (if any) required by delegate, specified as any valid type. The type and number of arguments must agree with the delegate signature.

    Method to call when a corresponding asynchronous operation completes, specified as a .NET System.AsyncCallback delegate or [] null value.

    Delegate, specified as a user-defined ,NET object or [] null value.

    Output Arguments

    collapse all

    Progress monitor of the asynchronous call, returned as a .NET System.IAsyncResult object. Use result as the input argument to the EndInvoke function.

    Version History

    Introduced in R2011a