System.ComponentModel.CancelEventArgs Class

Provides data for a cancelable event.

See Also: CancelEventArgs Members


public class CancelEventArgs : EventArgs


A cancelable event is raised by a component when it is about to perform an action that can be canceled, such as the System.Windows.Forms.Form.Closing event of a System.Windows.Forms.Form.


The System.Windows.Forms.Form.Closing event is deprecated and has been replaced by System.Windows.Forms.Form.FormClosing. It is offered as an example here only to illustrate the usage of System.ComponentModel.CancelEventArgs.

System.ComponentModel.CancelEventArgs provides the CancelEventArgs.Cancel property to indicate whether the event should be canceled.


Namespace: System.ComponentModel
Assembly: System (in System.dll)
Assembly Versions: 1.0.3300.0, 1.0.5000.0,,