Applications use the PingCompleted event to get information about the completion status and data collected by a call to one of the SendAsync methods. The PingCompletedEventHandler delegate provides the call back method invoked when SendAsync raises this event.
Ping pingSender = new Ping ();
// When the PingCompleted event is raised,// the PingCompletedCallback method is called.
pingSender.PingCompleted += new PingCompletedEventHandler (PingCompletedCallback);
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2