Below are two ways of reading in the commandline parameters. The first is the way that I\'m accustom to seeing using the parameter in the main. The second I stumbled on wh
To me the first way seems more intuitive because that is how I have been doing it since my C/C++ days.
If your commandline has one too many switches please do take a look at getopt that Thomas recommends. It's quite useful. I haven't had a look at C# port of the same though.
Regards,
kgr
Do you know getopt? There is a port for C# on codeplex: http://www.codeplex.com/getopt
Second way is better because it can be used outside the main(), so when you refactor it's one less thing to think about.
Also I don't like the "magic" that puts the args in the method parameter for the first way.
The first way is better because it's simpler.