c# - Pause program until key is pressed -


i have made script in c# , need pause script until user press key. need many pauses of type in program, making event every single realy boring. way, how can pause app until key pressed? console.readkey() in console application?

//some kind of running code //------------------ //pause until key pressed //------------------- //code running after key press 

your tags suggest wpf application without console. if need detect key press, override keydown event.

<window keydown="onkeydown" /> 

then

private void onkeydown(object sender, keyeventargs e) {     // signal activity continue } 

Comments

Popular posts from this blog

sql server - Cannot query correctly (MSSQL - PHP - JSON) -

php - trouble displaying mysqli database results in correct order -

C++ Linked List -