Is there an Event that gets raised when the process that I start via a Task gets stopped?
Currently I use
Currently I use
var processlist = Process.GetProcesses();
foreach(var theprocess in processlist)
{
if (theprocess.ProcessName != "DEMO")
continue;
theprocess.WaitForExit();
break;
}
to enum all processes and If I find my started program I wait for Exit. Is there a better way?