控制台应用程序的执行?

编程入门 行业动态 更新时间:2024-10-28 03:26:05
本文介绍了控制台应用程序的执行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

当我尝试运行控制台应用程序时,输出屏幕仅出现了不到一秒钟的时间.停止dos窗口不自行退出的代码应该是什么?

when i try to run a console application the output screen just appears for fraction of a second.What should be the code to stop the dos window not to exit on its own?? and what is the code to run my application from command prompt??

推荐答案

要保留输出屏幕,只需添加: To hold the output screen just add: Console.ReadKey();

到main函数的末尾. 要从命令提示符运行应用程序,只需导航至二进制文件的目录,键入exe的名称,然后按Enter. :)

to the end of your main function. And to run your application from command prompt just navigate to the dir of your binary file, type the name of your exe and press ENTER. :)

更多推荐

控制台应用程序的执行?

本文发布于:2023-07-27 13:47:25,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1222708.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:控制台   应用程序

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!