0

when i use Application.Exit() method in my application it is showing an error like

collection was modified exception is comming

how to handle this exception

Thanks in Advance

Kevin Crowell
  • 10,082
  • 4
  • 35
  • 51
  • Possible dup: http://stackoverflow.com/questions/1312885/application-exit-vs-application-exitthread-vs-environment-exit – Kevin Crowell Apr 02 '10 at 06:08
  • Don't handle an exception like that, fix the bug. If you have no idea where the bug might be located then post the StackTrace of the exception in your question. – Hans Passant Apr 02 '10 at 13:22

1 Answers1

0

You need to make sure that all of your threads are ended before you call Application.Exit()

Kevin Crowell
  • 10,082
  • 4
  • 35
  • 51