mscorlib(4.0.0.0) API with additions
System.ConsoleCancelEventArgs Class Reference

Provides data for the E:System.Console.CancelKeyPress event. This class cannot be inherited. More...

Inheritance diagram for System.ConsoleCancelEventArgs:
[legend]
Collaboration diagram for System.ConsoleCancelEventArgs:
[legend]

Public Attributes

ConsoleSpecialKey SpecialKey => _type
 Gets the combination of modifier and console keys that interrupted the current process. More...
 

Properties

bool Cancel [get, set]
 Gets or sets a value that indicates whether simultaneously pressing the F:System.ConsoleModifiers.Control modifier key and the F:System.ConsoleKey.C console key (Ctrl+C) or the Ctrl+Break keys terminates the current process. The default is false, which terminates the current process. More...
 

Additional Inherited Members

- Public Member Functions inherited from System.EventArgs
 EventArgs ()
 Initializes a new instance of the T:System.EventArgs class. More...
 
- Static Public Attributes inherited from System.EventArgs
static readonly EventArgs Empty = new EventArgs()
 Provides a value to use with events that do not have event data. More...
 

Detailed Description

Provides data for the E:System.Console.CancelKeyPress event. This class cannot be inherited.

Definition at line 5 of file ConsoleCancelEventArgs.cs.

Member Data Documentation

◆ SpecialKey

ConsoleSpecialKey System.ConsoleCancelEventArgs.SpecialKey => _type

Gets the combination of modifier and console keys that interrupted the current process.

Returns
One of the enumeration values that specifies the key combination that interrupted the current process. There is no default value.

Definition at line 29 of file ConsoleCancelEventArgs.cs.

Property Documentation

◆ Cancel

bool System.ConsoleCancelEventArgs.Cancel
getset

Gets or sets a value that indicates whether simultaneously pressing the F:System.ConsoleModifiers.Control modifier key and the F:System.ConsoleKey.C console key (Ctrl+C) or the Ctrl+Break keys terminates the current process. The default is false, which terminates the current process.

Returns
true if the current process should resume when the event handler concludes; false if the current process should terminate. The default value is false; the current process terminates when the event handler returns. If true, the current process continues.

Definition at line 16 of file ConsoleCancelEventArgs.cs.


The documentation for this class was generated from the following file: