AfricaDotNet
www.AfricaDotNet.com Continues the .NET Conversation in Africa

Today's Byte #4

rated by 0 users
Not Answered This post has 0 verified answers | 0 Replies | 1 Follower

Top 10 Contributor
40 Posts
Rad posted on 10-07-2009 11:07 AM

If you need to restart your .NET application, there are a number of ways to do it. The most commonly ised is to programatically kill the process and then start it, using the System.Diagnosics.Process class. A better way is to use the lesser know System.Windows.Forms.Applciation.Restart() method. The benefits are:

  • You don't need to work out where the application is
  • You don't need to know the original command line arguments - these are preserved and remembered
Page 1 of 1 (1 items) | RSS
(c) AfricaDotNet
Powered by Community Server (Non-Commercial Edition), by Telligent Systems