UtilConsoleRegisterConsoleKeyPressEventHandler Method

Emulates a KeyPress event-handler for the specified ConsoleKey within the current console instance.

To unregister a registered KeyPress event-handler, call UnregisterConsoleKeyPressEventHandler(ConsoleKey) method.

Definition

Namespace: DevCase.Core.Application.Console
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static void RegisterConsoleKeyPressEventHandler(
	ConsoleKey key,
	Action handler
)

Parameters

key  ConsoleKey
The ConsoleKey to register.
handler  Action
The Action delegate to invoke when key is pressed.

Example

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

See Also