响应命令提示符 [英] Respond to Command Prompt
本文介绍了响应命令提示符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,我想制作一个应用程序来响应命令提示符.因此,对于用户,它看起来像这样:
Hello I want to make an application to respond to Command Prompt.So for the user it will look like this:
Microsoft Windows [Version 6.0.6001]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.
c:\>myapp.exe -arg1
Hello you chose the first option.
How do I make my app respond with "Hello you chose the first option"?
推荐答案
if ((args.Length > 0) && (args[0] == "-arg1"))
{
Console.WriteLine("Hello you chose the first option");
}
这篇关于响应命令提示符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文