简体   繁体   中英

How to close command prompt on keyboard key down

I have a Command Prompt applocation which is doing some operation and at the end of the operation it displays some information to the user. So command prompt should not exit until user finish reading the message. Command prompt should only be closed on any keyboard key down event. How can I do this ?

Console.ReadKey();

将等待按键被按下。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM