A
A
AramBaram2021-09-28 20:04:11
C++ / C#
AramBaram, 2021-09-28 20:04:11

How can I make it write to a file when pressing backspace?

How to make that when you press backspace, there would be a write to a file in c #?
On c# console

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vasily Bannikov, 2021-09-28
@AramBaram

var key = Console.ReadKey();
if(key == ConsoleKey.Backspace)
  WriteDataToFile();

R
Roman, 2021-09-28
@yarosroman

The right question is 50% of the answer. Which app? Console, wpf, uwp, winforms?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question