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
This got the job done for me:
Instead of using:
Application.Exit()
which leaves other threads open, try using:
Environment.Exit(Environment.ExitCode);