Application.Exit Method (CancelEventArgs)

 
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.

Informs all message pumps that they must terminate, and then closes all application windows after the messages have been processed.

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

public static void Exit(
	CancelEventArgs e
)

Parameters

e
Type: System.ComponentModel.CancelEventArgs

Returns whether any Form within the application cancelled the exit.

SecurityException

For permission to terminate a running application thread. Associated enumeration: UnmanagedCode

.NET Framework
Available since 2.0
Return to top
Show: