按任意键继续...而无需在控制台中添加? [英] Press any key to continue... without adding in Console?

查看:173
本文介绍了按任意键继续...而无需在控制台中添加?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚开始学习VB.net并在YouTube上观看很多教程。我已经检查了一些导师不包括Console.WriteLine(按任意键继续)但仍在他们调试时,在控制台中,它显示按任意键继续行,怎么可能?



请帮助



https://www.youtube.com/watch?v=HuLJbiqpIM0。将时间托盘移动到09.55以在控制台中查看确切的命令。

解决方案

如果在没有调试器的VS中运行控制台应用程序(即使用CTRL + F5代替然后它在应用程序执行后使用操作系统PAUSE命令来显示该消息并保持窗口打开。



但这意味着你无法调试你的应用程序使用调试器,所以我自己坚持使用WriteLine / ReadLine组合 - 至少在应用程序完全正常工作之前。


谢谢这就是我要找的。

I have been just starting learning VB.net and watching many tutorials on YouTube. I have checked some of the tutors doesn't include Console.WriteLine("Press any key to continue") but still when they debug and in the console, it shows the line "Press any key to continue", how is it possible?

Please help

https://www.youtube.com/watch?v=HuLJbiqpIM0 . move the time tray to 09.55 to see the exact command in console.

解决方案

If you run a console app in VS without the debugger (i.e. by using CTRL+F5 instead of F5) then it uses an operating system PAUSE command after the application execution to show that message and keep the window open.

But that means you can't debug your app using the debugger, so I'd stick to a WriteLine / ReadLine combination myself - at least until you have the app fully working.


Thanks this is what I am looking for.


这篇关于按任意键继续...而无需在控制台中添加?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆