System.Windows.Forms.Application.ExitThread Method

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

Syntax

public static void ExitThread ()

Remarks

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

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0