Is calling Process.Refresh() required for Process.HasFinished

Posted by Rekreativc on Stack Overflow See other posts from Stack Overflow or by Rekreativc
Published on 2010-05-03T08:55:57Z Indexed on 2010/05/03 9:28 UTC
Read the original article Hit count: 368

Filed under:
|
|

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.

© Stack Overflow or respective owner

Related posts about c#

Related posts about process