Close & restart an application

  • Thread starter Thread starter CV
  • Start date Start date
C

CV

Hi,

I would like close & restart the same application automatically. How can I
achieve this.

Please suggest

Thanks & Regards
CV
 
CV said:
Hi,

I would like close & restart the same application automatically. How can I
achieve this.

Please suggest

Try this:

// shut down the current app instance

System.Windows.Forms.Application.Exit();

// restart the app

Process.Start(System.Windows.Forms.Application.ExecutablePath);
System.Windows.Forms.Application.DoEvents();
 
Back
Top