ConsoleSpecialKey Enumeration

 
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.

Specifies combinations of modifier and console keys that can interrupt the current process.

Namespace:   System
Assembly:  mscorlib (in mscorlib.dll)

[<SerializableAttribute>]
type ConsoleSpecialKey

Member nameDescription
ControlBreak

The ConsoleModifiers.Control modifier key plus the BREAK console key.

ControlC

The ConsoleModifiers.Control modifier key plus the ConsoleKey.C console key.

The ConsoleCancelEventArgs.SpecialKey property returns the ConsoleSpecialKey enumeration type.

Simultaneously pressing certain key combinations signals the operating system to interrupt the currently running process. The two valid key combinations are ConsoleModifiers.Control plus BREAK (CTRL+BREAK) and ConsoleModifiers.Control plus ConsoleKey.C (CTRL+C).

The following code example displays the ConsoleSpecialKey value that invokes the associated event handler.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show: