System.ComponentModel.CancelEventArgs Class

Provides data for a cancelable event.

See Also: CancelEventArgs Members

Syntax

public class CancelEventArgs : EventArgs

Remarks

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.

Note:

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.

Requirements

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