Szerkesztés

Megosztás a következőn keresztül:


SmtpClient.OnSendCompleted(AsyncCompletedEventArgs) Method

Definition

Raises the SendCompleted event.

protected:
 void OnSendCompleted(System::ComponentModel::AsyncCompletedEventArgs ^ e);
protected void OnSendCompleted (System.ComponentModel.AsyncCompletedEventArgs e);
member this.OnSendCompleted : System.ComponentModel.AsyncCompletedEventArgs -> unit
Protected Sub OnSendCompleted (e As AsyncCompletedEventArgs)

Parameters

e
AsyncCompletedEventArgs

An AsyncCompletedEventArgs that contains event data.

Remarks

Classes that inherit from the SmtpClient class can override the OnSendCompleted method to perform additional tasks when the SendCompleted event occurs.

OnSendCompleted also allows derived classes to handle SendCompleted without attaching a delegate. This is the preferred technique for handling SendCompleted in a derived class.

Notes to Inheritors

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

Applies to