Using the method Application.Restart() in C# should restart the current application: but it seems that this is not always working.
Is there a reason for this Issue, can somebody tell me, why it doesn’t work all the time?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
There could be a lot of reasons for this. It’s not that the method doesn’t work; rather, many times programmers forget that they’ve put something in their code that would stop the application from automatically shutting down, or starting up. Two examples:
Check your code for gotchas like that. If you’re seeing this behaviour within a blank application, then that’s more likely to be a problem with the actual function than your code.
Check Microsoft’s sourcecode of application restart.