Application.Exit() not working

When i tried to end my application with Application.Exit() Visual Studio seems to throw me an exception pointing to the Application.Run(new FormNameHERE()) saying that it had nothing to start. But my Application only calls the Application.Exit() after the Application.Run() in had been executed. Kinda strange. A workaround i did was to do an empty try..catch.

But is this a bug or is it just happening to me



Answer this question

Application.Exit() not working

  • Tyagi

    Are you able to trace from the Application.Run into the constructor of FormNameHERE It may be that the form name has changed and the main Application.Start hasn't been changed.

  • multisession

    What is the exact exception message, and stack trace


  • Application.Exit() not working