Is calling Process.Refresh() required for Process.HasFinished
- by Rekreativc
Hello
I am interested if calling Process.Refresh() is mandatory when waiting for the process to terminate by checking Process.HasFinished property?
I have a piece of code that works fine without the Process.Refresh() call, however I am curious weather this is a coincidence? I can see that a msdn example has the Process.Refresh() call...
If its not necessary, and Process.HasExited is the only property I need, are there any advantages to making the call to Process.Refresh() ? If not, is there a reason it is in the msdn example?
Thank you for your answers.