C#程序退出的几种方法
** 方法一:**
this.Close();
**方法二:**
Application.
Exit();
**方法三:**
Application.ExitThread();
**方法四:**
System.
Environment.
Exit(
0); //这是最彻底的退出方式,不管什么线程都被强制退出,把程序结束的很干净,退出时有可能会抛出异常
**方法五:**
System
.Diagnostics.Process tt = System
.Diagnostics.Process.GetProcessById(System
.Diagnostics.Process.GetCurrentProcess()
.Id)
tt
.Kill()