There's a CommandLine parser library for C# written by gsscoder (it has its own SO tag and I'm adding it). It parses command-line options in getopt
style, i.e.:
myprogram --foo --bar=baz abc def ghi
It can also have so called “unbound” parameters, i.e freestanding positional parameters that are not bound to options; in the example above these are abc
, def
, and ghi
. Unfortunately, the documentation only mentions that “the parser has its means to handle these,” but doesn't give an example. And my C# is not that sharp so I'm intimidated by the amount of source code to scan to find it out.
Could someone please give an example of how to access these unbound parameters after parsing?