While working with .Net Base Class Libraryyou will find that each event passes two parameters.
First it always has a type System.Object, and another type (or a descendant) System.EventArgs.
The first argument object sendercan be safely applied to the type of class that raised this event. In your case, this is a type System.Diagnostics.Process.
Example:
private void cExited(object o, EventArgs e)
{
Process p = (Process)o;
}
source
share