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
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
char c = Console. ReadKey().KeyChar ;
Capture the key and overwrite it with blank
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.