There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
The Command Line Parser is a great library to use for parsing arguments but it does have one problem that i find annoying. Let's say that I have an options class with a bool property. The corresponding argument that will be parsed will be the string "False".
The ParseArguments method won't return false, so I understand that the parsing has succeeded. When I check the bool property of the options object it returns true. If i pass the string "false" as an argument the property will be false after the parsing.
I don't find this to be the correct way the parser should function. When I compose an array of arguments I will be tempted to use the bool.FalseString constant which is in fact the "False" string.
I am curious why the ParseArguments doesn't return false if for a bool option the argument value is "False". If that's the normal behavior for the ParseArguments method I don't think it would be too much to ask to correctly parse the bool.FalseString
and bool.TrueString values when they are passed as arguments.
Thank you for your consideration.