How to make a C# console app terminate on the press of the "Esc" Button

Morad Tamer

Commendable
Apr 21, 2016
43
0
1,590
4
hi Guys I was watching a video on YouTube from a channel called Barnacules Nerdgasm about how to make a Prank software the problem is that there is a piece of code the tells the app to close when ever a key then enter is pressed which is "Console.Read();" please correct me if I am wrong
so after I the keyboard manipulator writes about 250 characters the program terminates automatically before a set time to do other things
so how can I make it to respond to the "Esc" button to make it close only if this button was pressed

The video i was watching
 

Morad Tamer

Commendable
Apr 21, 2016
43
0
1,590
4


yes I know but I want to make it disabled by pressing Esc
can you please help me ??
 
Thread starter Similar threads Forum Replies Date
A Apps General Discussion 5
J Apps General Discussion 6
G Apps General Discussion 0
S Apps General Discussion 1
S Apps General Discussion 2
Rainfire Apps General Discussion 3
M Apps General Discussion 5
R Apps General Discussion 3
Lumia925 Apps General Discussion 6
C Apps General Discussion 1
RAZER Gamer Apps General Discussion 2
Mr Davo Apps General Discussion 2
J Apps General Discussion 2
emtasty123 Apps General Discussion 1
Bellzemos Apps General Discussion 6
Meaning_Raptor Apps General Discussion 1
C Apps General Discussion 6
E Apps General Discussion 4
R Apps General Discussion 2
S Apps General Discussion 3

ASK THE COMMUNITY