Tuesday, December 29, 2009

what is the use of Application.Exit() method?


Notifies all message loops to quit, closes windows opened by them and closes program.


www.codecollege.NET

what is the use of the Environment.Exit() method?


Terminates the program and gives the return value to os as exit code.


www.codecollege.NET

Daily Tips- Tip #45 - How to exit c# applications?


You can exit using the following 2 static methods,
1. Environment.Exit(returnval)
2. Application.Exit()


www.codecollege.NET