title: Application.Exit() vs Application.ExitThread() vs Environment.Exit()
body: <p>I am trying to figure out which I should be using.  On closing my WinForm app fires of a Form in Dialog mode.  That form runs a Background worker that Syncs the DB with the remote DB and displays it's progress on the "Splash Form."  </p>
  
  <p>I have a method like so:</p>
  
  <pre><code>private void CloseMyApp()
  {
      SaveUserSettings();
  
      splashForm = new SplashForm();
      splashForm.ShowDialog();
  
      Application.ExitThread();
      //Application.Exit();
  }
  </code></pre>
  
  <p>which is what I call to close my app from <strong>Menu --> Exit</strong> and in the <code>Form_FormClosing()</code> event.  <code>Application.Exit()</code> gives the following error --></p>
  
  <blockquote>
    <p>Collection was modified; enumeration operation may not execute.</p>
  </blockquote>
  
  <p>Now I read that <code>Environment.Exit()</code> is brutal and means there is probably something wrong with your app (see <a href="https://stackoverflow.com/questions/905544/whats-difference-between-environment-exit-and-application-shutdown/905584#905584">here</a>).</p>
  
  <p><code>Application.ExitThread()</code> works but I am concered that it may only be APPEARING to work and as I have never used it before I am not sure when it is normally appropriate to do so.</p>