Application.Exit()
this.Close()
Environment.Exit(0)
this.dispose()用哪个好点,以及各个的区别?

解决方案 »

  1.   

    Application.Exit() 这个就行了
      

  2.   

    Application.Exit() //退出应用程序
    this.Close() //关闭界面。当然如果你关闭的是主界面,程序就退出了。建议用第一个。
      

  3.   

    Application.Exit()     ///推荐这个
    this.Close()           //这个在当你的窗口不是application.Run(...)里面那个的参数的时候程序并不会退出。
    Environment.Exit(0)    //这个没用过
    this.dispose()         //这个和第二个一样
      

  4.   

    Application.Exit() 关闭所有应用程序窗口
    this.Close() 关闭窗体
    Environment.Exit(0) 终止此进程并为基础操作系统提供指定的退出
    this.dispose() 释放资源
      

  5.   

    Application.Exit() 这个就直接退了.
      

  6.   

    Application.Exit() 这个就直接退了