C# WinForm 如何实现程序重启?

比如有一个窗体Form1,上面有一个按钮btn1,要求单击btn1的时候程序关闭,然后再打开自己,请问怎么写代码?谢谢!

if ( MessageBox.Show("要重新启动嘛?","提示", MessageBoxButtons.YesNoCancel,
MessageBoxIcon.Question) == DialogResult.Yes)

System.Diagnostics.Process.Start(System.Reflection.Assembly.GetExecutingAssembly().Location);
温馨提示:答案为网友推荐,仅供参考