Bewerken

Delen via


BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs) Method

Definition

Raises the RunWorkerCompleted event.

protected:
 virtual void OnRunWorkerCompleted(System::ComponentModel::RunWorkerCompletedEventArgs ^ e);
protected virtual void OnRunWorkerCompleted (System.ComponentModel.RunWorkerCompletedEventArgs e);
abstract member OnRunWorkerCompleted : System.ComponentModel.RunWorkerCompletedEventArgs -> unit
override this.OnRunWorkerCompleted : System.ComponentModel.RunWorkerCompletedEventArgs -> unit
Protected Overridable Sub OnRunWorkerCompleted (e As RunWorkerCompletedEventArgs)

Parameters

e
RunWorkerCompletedEventArgs

An EventArgs that contains the event data.

Remarks

Raising an event invokes the event handler through a delegate. For more information, see Handling and Raising Events.

The OnRunWorkerCompleted method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

Notes to Inheritors

When overriding OnRunWorkerCompleted(RunWorkerCompletedEventArgs) in a derived class, be sure to call the base class's OnRunWorkerCompleted(RunWorkerCompletedEventArgs) method so that registered delegates receive the event.

Applies to

See also