Skip to content
Iuga Alexandru edited this page Sep 6, 2018 · 8 revisions

Description

Displays a message to the Console and waits for the user to press any key.

Features

  • Custom text message
  • Custom key that unlocks the pause - Or any key if none is provided.
  • Hide cursor while pausing
  • Erase after close - The pause text will be erased after the user presses the unlock key.

Example

Static method (quick)

Pause.QuickDisplay();

Result:

Instance (more power)

Pause pause = new Pause
{
    Text = "Press P key to continue...",
    HideCursor = true,
    UnlockKey = ConsoleKey.P
};
pause.Display();

Result:

Clone this wiki locally