程序异常重启代码

System.Diagnostics.ProcessStartInfo cp = new System.Diagnostics.ProcessStartInfo();
            cp.FileName = Application.ExecutablePath;
            cp.Arguments = "cmd params";
            cp.UseShellExecute = true;
            System.Diagnostics.Process.Start(cp);

            System.Threading.Thread.Sleep(3000);
            Environment.Exit(0);

 https://blog.csdn.net/bruce135lee/article/details/78551532

猜你喜欢

转载自www.cnblogs.com/gaara-zhang/p/9700303.html