Restart an application by itself

后端 未结 10 637
醉话见心
醉话见心 2020-12-13 02:46

I want to build my application with the function to restart itself. I found on codeproject

ProcessStartInfo Info=new ProcessStartInfo();
Info.Arguments=\"/C          


        
10条回答
  •  生来不讨喜
    2020-12-13 03:21

    Winforms has the Application.Restart() method, which does just that. If you're using WPF, you can simply add a reference to System.Windows.Forms and call it.

提交回复
热议问题