本文介绍了控制台应用程序的执行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试运行控制台应用程序时,输出屏幕仅出现了不到一秒钟的时间.停止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??

推荐答案

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. :)


这篇关于控制台应用程序的执行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-28 20:18
查看更多