I need to create Watchgog application that will keep track of main application. If my main application is crashed/closed/ended by any means, this watchdog application will activate it again.
I can do this by scanning running process at regular intervals, but this is resource intensive process. Can I get any notification when process is terminated (not Form Closing event, it does not work when application crashes)?
Process class does give you such functions.
So you need to find your process only once and than in your watchdog use provided method or event.