












using System.Diagnostics;
string strAppFileName=Process.GetCurrentProcess().MainModule.FileName;
Process myNewProcess=new Process();
myNewProcess.StartInfo.FileName=strAppFileName;
myNewProcess.StartInfo.WorkingDirectory=Application.ExecutablePath;
myNewProcess.Start();
Application.Exit();
或者
if ( MessageBox.Show("要重新启动嘛?","提示", MessageBoxButtons.YesNoCancel,
MessageBoxIcon.Question) == DialogResult.Yes)
System.Diagnostics.Process.Start(System.Reflection.Assembly.GetExecutingAssembly().Location);
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。