+ 1
C# program shutdown with a specific key
Hey! Can someone help me with that i would like to write a consol app int c#. I would like to make that this consol app closes only in one condition for example when i press esc or when i type exit. How can i code it?
3 Antworten
+ 1
do{
// some code; get input etc.
if (input == "exit"){
break;
}
}while(true);
0
This what you want?
0
Yes i guess. I will try it. Thanks a lot