Command Line Parser Library - Boolean Parameter

前端 未结 2 1220
独厮守ぢ
独厮守ぢ 2021-01-03 20:34

I try to pass a boolean parameter to a console application and process the value with the Command Line Parser Library.

[Option(\'c\', \"closeWindow\", Requir         


        
2条回答
  •  醉酒成梦
    2021-01-03 20:56

    You don't need to add True or False. Using -c will evaluate to True. Not using it will evaluate to False. Somewhere in the documentation there is an example with -v for verbose output. But I can't find it right now. I guess Required=true is not necessary for Boolean options.

提交回复
热议问题