Possible Duplicate:
Best way to parse command line arguments in C#?
What's the best practice for handling command line arguments?
That is, I want my console application (VC#2008) to be able to handle arguments on command line just like most of the other command line tools do:
> mytool.exe -LongArgument Value -sa value --abcdef
Where the arguments are LongArgument: Value
, sa
is an abbr. of ShortArgument
with value
and abcdef
are switch-arguments that are just activated when given.
How can I code this in a way that is easily extensible when new arguments come along?