Open dashenxian opened 4 months ago
if YUpToZUp is bool? type,it will be right;
[Option('t',"y-up-to-z-up", Required = false, HelpText = "Convert the upward Y-axis ",Default=true)]
-- public bool YUpToZUp { get; set; }
++ public bool? YUpToZUp { get; set; }
bool
parameters are a Switch Option
. If the option is passed to the command line, it will always be true
.
For your desired behavior (being able to pass it and set it to false
) you need to declare it as a bool?
.
For documentation about this, see:
https://github.com/commandlineparser/commandline/wiki/CommandLine-Grammar#switch-option
bool
parameters are aSwitch Option
. If the option is passed to the command line, it will always betrue
.For your desired behavior (being able to pass it and set it to
false
) you need to declare it as abool?
.For documentation about this, see:
https://github.com/commandlineparser/commandline/wiki/CommandLine-Grammar#switch-option
Thanks
code:
YUpToZUp is not right,and input will be override by YUpToZUp's value![image](https://github.com/commandlineparser/commandline/assets/18696614/db570d13-52ff-4075-9245-652dbd6b46fb)