NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Application.ExitThread

Exits the message loop on the current thread and closes all windows on the thread.

[Visual Basic]
Public Shared Sub ExitThread()
[C#]
public static void ExitThread();
[C++]
public: static void ExitThread();
[JScript]
public static function ExitThread();

Remarks

Use this method to exit the message loop of the current thread. This method will cause the call to Run for the current thread to return. To exit the entire application, call System.WinForms.App.Application.Exit.

Requirements

NGWS Runtime Security:

UIPermission You must have the System.security.Permissions.UIPermission for AllWindows to set this method.

See Also

Application Class | Application Members | System.WinForms Namespace | Exit