1

I would like to ask you for help. How i am supposed to remove whole text when i press a button, (for instance 1). Is there a way to do that?

The problem is on c# console application

3 Answers3

0
  char c = Console.     ReadKey().KeyChar ; 

Capture the key and overwrite it with blank

0

With Console.Clear() you can remove every Text from the console.

Manuel Zelenka
  • 1,616
  • 2
  • 12
  • 26
0

You can use

Console.Clear();

to clear the console window. This removes the whole text from the console window.

Or send a delete character to move the cursor backwards:

 Console.Write("\b");

The you can overwrite it with another character.

Community
  • 1
  • 1
ventiseis
  • 3,029
  • 11
  • 32
  • 49