Application.ExitThread Method ()

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public static void ExitThread()

Use this method to exit the message loop of the current thread. This method causes the call to Run for the current thread to return. To exit the entire application, call Exit.

SecurityPermission

for the immediate caller to call unmanaged code. Associated enumeration: SecurityPermissionFlag.UnmanagedCode

.NET Framework
Available since 1.1
Return to top
Show: