what is the use of command line arguments in c# And Why it is used ?

Posted by Kasani007 under C# on 12/12/2017 | Points: 10 | Views : 470 | Status : [Member] | Replies : 3
what is the use of command line arguments in c# And Why it is used ? what is the purpose of it in console application and also in windows forms application?




Responses

Posted by: Sheonarayan on: 12/12/2017 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
They are used to pass the parameters value to the applications.

For example, if your exe name is CreateAccount.exe and you pass amount (1000) and name (Kasani) as parameter then you can write like this (provided your application is written to accept two parameters)

CreateAccount.exe 1000, "Kasani"


Here you are passing two parameters to the application.

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Kasani007, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Kasani007 on: 12/13/2017 [Member] Starter | Points: 25

Up
0
Down
Hi Sheo Narayan,

ThanQ for your response.

Actually My doubt is that in which scenarios we have to use In projects, In what type of projects we have to use this commandline arguments...

waiting for your reply....

Kasani007, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Pandyamanav on: 12/14/2017 [Member] Starter | Points: 25

Up
0
Down
Hello

Nice question to be asked

I have used command line argument in so many language like java , c# console and windows form

Main things is what that we can accept user input through cmd

at last it totally depends you that when to use but cmd is not more useful in large or medium scale application

Thanks

Kasani007, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response