System.Windows.Forms.ApplicationContext.ExitThread Method

Terminates the message loop of the thread.

Syntax

public void ExitThread ()

Remarks

This method calls ApplicationContext.ExitThreadCore.

Note:

ApplicationContext.ExitThread and ApplicationContext.ExitThreadCore do not actually cause the thread to terminate. These methods raise the Application.ThreadExit event to which the System.Windows.Forms.Application object listens. The System.Windows.Forms.Application object then terminates the thread.

Requirements

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