var process=Process.Start("c:\temp.txt);
process..Exited+=OnExitHandler;
First line open c:\temp.txt on notepad But when I close this notepad I not catch OnExitHandler
why?
var process=Process.Start("c:\temp.txt);
process..Exited+=OnExitHandler;
First line open c:\temp.txt on notepad But when I close this notepad I not catch OnExitHandler
why?
You need to set true 'EnableRaisingEvents'
myProcess.EnableRaisingEvents = true;