System.ComponentModel.AsyncCompletedEventArgs Class

Provides data for the MethodNameCompleted event.

See Also: AsyncCompletedEventArgs


public class AsyncCompletedEventArgs : EventArgs


If you are using a class that implements the Event-based Asynchronous Pattern Overview, the class will provide a MethodNameCompleted event. If you add an instance of the AsyncCompletedEventHandler delegate to the event, you will receive information about the outcome of asynchronous operations in the AsyncCompletedEventArgs parameter of the corresponding event-handler method.

The client application's event-handler delegate can check the AsyncCompletedEventArgs.Cancelled property to determine if the asynchronous task was cancelled.

The client application's event-handler delegate can check the AsyncCompletedEventArgs.Error property to determine if an exception occurred during execution of the asynchronous task.

If the class supports multiple asynchronous methods, or multiple calls to the same asynchronous method, you can determine which task raised the MethodNameCompleted event by checking the value of the AsyncCompletedEventArgs.UserState property. Your code will need to track these tokens, known as task IDs, as their corresponding asynchronous tasks start and complete.


Namespace: System.ComponentModel
Assembly: System (in System.dll)
Assembly Versions:,
Since: .NET 2.0

The members of System.ComponentModel.AsyncCompletedEventArgs are listed below.

See Also: EventArgs

Public Constructors

Initializes a new instance of the AsyncCompletedEventArgs class.

Public Properties


Gets a value indicating whether an asynchronous operation has been canceled.


Gets a value indicating which error occurred during an asynchronous operation.


Gets the unique identifier for the asynchronous task.

Protected Methods


Raises a user-supplied exception if an asynchronous operation failed.