views:

102

answers:

1

I'm asking this question, because I can't figure out when I could find an use of this method.

If I've designed everything correctly then I should be able by the medium of normal returns and try catch clauses to handle all problems and end the application in a correct manner.

Am I wrong ?

+3  A: 

Where would you return from though? The point is to shut down the Windows Forms UI, that's all. It's simpler than trying to work out every form which is open and close it - which is what you'd normally have to do, I believe.

Jon Skeet
OK that means that all allocated resources (all threads inclusive) are immediately deleted from memory ?
PaN1C_Showt1Me
@PaN1C_Showt1Me: No, it really just shuts down all WinForms event loops and closes windows. If there are other threads, or if the WinForms threads do other things after the event loops, those will still execute.
Jon Skeet
OK Thank you it's clearer now !
PaN1C_Showt1Me