Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 761137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T15:48:09+00:00 2026-05-14T15:48:09+00:00

I am interested if calling Process.Refresh() is mandatory when waiting for the process to

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T15:48:09+00:00Added an answer on May 14, 2026 at 3:48 pm

    as you’ve noticed, MSDN doesn’t exactly specify, what information is cached and thus needs to be refreshed using Process.Refresh().

    After a short (and probably incomplete) analysis of the class using reflector it seems though, that the HasExited property is “calculated” every time it’s accessed. Refresh seems mostly to force an update of the internal ProcessInfo object, which contains information such as memory consumption, handle information etc.

    On the other hand, Refresh doesn’t really fetch all this information, it simply discards the internal cache. The information is only refetched when you access any of the properties. So Refresh has practically no performance overhead.
    Therefore it might be more secure to call Refresh just in case Microsoft decides to change the HasExited implementation in the future.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am interested in the shortest, neatest piece of C# code around that will
I have a Solaris process, which is a C++ application that is loaded by
I have to doubts regarding to calling images that are stored in my project:
I'm interested in calling fortran codes in a Mathematica session. I learn that Mathlink
I am interested in doing this C code in Java: // sets n's ith
I am interested in logging all traffic that comes over port 443 for trouble-shooting
I am interested if creating a new std::vector (or calling its assign method) creates
I'm interested in objective analysis of which is more performant; calling instance methods of
I'm interested what's the reason to have call() method in JS. It seems it
Aim: Calling a very slow stored procedure (with parameters) asynchronously from code behind of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.