简体   繁体   English

控制台中带有参数的应用程序

[英]application with argument in the console

I have an application which takes several arguments entered in the console : here is an example : 我有一个需要在控制台中输入几个参数的应用程序:这是一个示例:

MyApp.exe -D 23/01/2014 -B True

according to these arguments the application will behave differently how can I add that in my code 根据这些参数,应用程序的行为将有所不同,如何在代码中添加它

这是一个有关您如何获取参数的链接

只是想添加到粗体答案,如果您使用的是VS,则可以添加这些arg,以便每次调试时都可以获取它们,右键单击项目->属性->调试->,在开始选项中有一个称为command的文本区域。行参数,希望这会有所帮助。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在控制台应用程序中屏蔽密码参数 - Masking a password argument in a console application 将冗长的字符串(作为参数)传递到控制台应用程序中 - Passing lengthy strings (as an argument) into a console application 通过使用Web应用程序提供一个参数来运行控制台应用程序 - Run Console application by providing one argument using web application 无法将参数传递给控制台应用程序,我的想法有缺陷吗? - Unable to pass argument to console application, are there flaws in my thinking? 无法将文本文件(.txt)作为命令行参数传递给控制台应用程序 - Not able to pass text file(.txt) as command line argument to console application 将引号字符(“)传递为C#控制台应用程序参数 - Passing Quotation Mark Character (") as C# Console Application Argument 如何根据参数参数运行显示控制台 window 的 dotnet Core 控制台应用程序? - How to run dotnet Core console application that shows the console window or not based on argument parameters? 控制台应用程序错误“索引(从零开始)必须大于或等于零且小于参数列表的大小” - Console Application Error “Index (zero based) must be greater than or equal to zero and less than the size of the argument list” 如何使用C#在具有空格的控制台应用程序中传递参数 - how to pass argument in console application which having space using c# 为控制台应用程序加载应用程序 - Loading application for Console Application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM