System.ComponentModel.AsyncCompletedEventArgs.Error Property

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

Syntax

public Exception Error { get; }

Value

Documentation for this section has not yet been entered.

Remarks

If an exception is raised during an asynchronous operation, the class will assign the exception to the AsyncCompletedEventArgs.Error property. The client application's event-handler delegate should check the AsyncCompletedEventArgs.Error property before accessing any properties in a class derived from System.ComponentModel.AsyncCompletedEventArgs; otherwise, the property will raise a System.Reflection.TargetInvocationException with its Exception.InnerException property holding a reference to AsyncCompletedEventArgs.Error.

The value of the AsyncCompletedEventArgs.Error property is null if the operation was canceled.

Requirements

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