When to use Command-Line Arguments? [on hold]

问题内容:

I’ve recently learned about Command-Line arguments (in C#), but I couldn’t understand something: When to use it? When should I use it in my program? could you please give me a scenario for its usage? Is it practical only for Console Applications? could you give me an example?
Thanks

问题评论:

    
If you have a console application which will be run, say nightly, to do some work without a user, how will you give it input? Answer: args
    
So, as you said it’s not really functional in most of applications? and it would be used only for Console apps. Right?
– Amir Hossein Ahmadi
yesterday
    
The answer is just as broad as the question: It’s appropriate whenever you want to be able to provide data to your application when you run it
    
That was an example. You can search online for other examples.
1  
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or specific expertise, but this question will likely solicit debate, arguments, polling, or extended discussion.

原文地址:

https://stackoverflow.com/questions/47740451/when-to-use-command-line-arguments

添加评论