C#ConsoleApplication命令行参数. [英] C# ConsoleApplication CommandLineArguments.

查看:212
本文介绍了C#ConsoleApplication命令行参数.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在C#控制台应用程序中.在VS 2008/2010中执行调用时,如何为Main方法提供参数?我可以在VS命令属性中执行此操作.但是在VS中,当我按F5键时,它将显示错误.

In C# console app. how can I supply parameters to the Main method at the time of invoking for execution in VS 2008/2010? I can do it in VS command-propt. But in VS when I press F5 key then it displays the error.

推荐答案

右键单击解决方案资源管理器"窗格中的项目",然后选择属性". > 在显示页面中,选择调试"选项卡.
命令行参数与工作目录位于中间.
Right click the Project in the Solution Explorer pane, and select "Properties".
In the page with displays, select the "Debug" tab.
Command line arguments are in the middle, along with the working directory.


这篇关于C#ConsoleApplication命令行参数.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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