Lightweight Argument Parser for C# console application
Support parsing arguments from CLI in various methods for ease of use:
--argFullName argvalue
-argShortName argvalue
/argName:argvalue
/argName=argvalue
The CLI arguments parsed with case-insensitive (Only keys, not values) and converted (from string) to the desired/declared type.
- Non-nullable/primitives data types get the default value if not provided from the CLI (i.e. enum/int = 0)
Therefore, use the
IsSetmethod on the instantiatedArgParserobject - Nullable/ref type can simply be checked if they are null
See example in Program.cs