0
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?

csc3cc3
  • 11
  • 1

1 Answers1

1

You need to set true 'EnableRaisingEvents'

myProcess.EnableRaisingEvents = true;