How to properly exit a C# application?

From MSDN: Application.Exit Informs all message pumps that they must terminate, and then closes all application windows after the messages have been processed. This is the code to use if you are have called Application.Run (WinForms applications), this method stops all running message loops on all threads and closes all windows of the application. Environment.Exit … Read more

How to use sys.exit() in Python

I think you can use You may check it here in the python 2.7 doc: The optional argument arg can be an integer giving the exit status (defaulting to zero), or another type of object. If it is an integer, zero is considered “successful termination” and any nonzero value is considered “abnormal termination” by shells and the … Read more