SmtpClient.OnSendCompleted(AsyncCompletedEventArgs) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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.