How to ignore cases

Case-sensitive or ignore case behavior

When the command-line is parsed the results are always case-sensitive (see Command Line Parser). Finally it depends how you want to use the parsed results. If you use the Commander object, you can simply provide a Settings object, to tell the Commander to ignore cases, when resolving Verbs/Commands and Options.

Commander commander = new Commander( new Settings {IgnoreCase = true, ..

The Commander and Command.Execute() will then ignore cases, and Verbs and Option tags will be case-ignorant (see Sample03.Options).

While Option tags can be 'this or that', __ Option values and Targets are always case-sensitive!

Last updated