Exits the application.
[Visual Basic] Public Shared Sub Exit() [C#] public static void Exit(); [C++] public: static void Exit(); [JScript] public static function Exit();
This method stops all running message loops on all threads and closes all windows of this application. This method does not actually force the application to exit, but rather causes all calls to Run to return. To exit a message loop for only the current thread, call ExitThread.
NGWS Runtime Security:
UIPermission | You must have the System.security.Permissions.UIPermission for AllWindows to set this method. |
Application Class | Application Members | System.WinForms Namespace | ExitThread | Run