How to exit all running threads?

后端 未结 6 1829
有刺的猬
有刺的猬 2020-12-02 20:02

The following code does not exit the application. How can I exit the application and make sure all the running threads are closed?

foreach (Form form in Appl         


        
6条回答
  •  一向
    一向 (楼主)
    2020-12-02 20:19

    You can try the following code:

    Environment.Exit(Environment.ExitCode);
    

提交回复
热议问题