Looks like everybody has their own pet command-line parsers, figure I had better add mine as well :).
http://bizark.codeplex.com/
This library contains a command-line parser that will initialize a class with the values from the command-line. It has a ton of features (I've been building it up over many years).
From the documentation...
Command-line parsing in the BizArk framework has these key features:
- Automatic initialization: Class properties are automatically set based on the command-line arguments.
- Default properties: Send in a value without specifying the property name.
- Value conversion: Uses the powerful ConvertEx class also included in BizArk to convert values to the proper type.
- Boolean flags: Flags can be specified by simply using the argument (ex, /b for true and /b- for false) or by adding the value true/false, yes/no, etc.
- Argument arrays: Simply add multiple values after the command-line name to set a property that is defined as an array. Ex, /x 1 2 3 will populate x with the array { 1, 2, 3 } (assuming x is defined as an array of integers).
- Command-line aliases: A property can support multiple command-line aliases for it. For example, Help uses the alias ?.
- Partial name recognition: You don’t need to spell out the full name or alias, just spell enough for the parser to disambiguate the property/alias from the others.
- Supports ClickOnce: Can initialize properties even when they are specified as the query string in a URL for ClickOnce deployed applications. The command-line initialization method will detect if it is running as ClickOnce or not so your code doesn’t need to change when using it.
- Automatically creates /? help: This includes nice formatting that takes into account the width of the console.
- Load/Save command-line arguments to a file: This is especially useful if you have multiple large, complex sets of command-line arguments that you want to run multiple times.