command-line-parser

Parse command line arguments/options in C#

陌路散爱 提交于 2019-12-24 09:25:52
问题 I have a console application with some arguments and options so I would like to use a free third-party library. I have found two libraries for this purpose: NDesk.Options and Command Line Parser Library Finally I have decided to use Command Line Parser Library because it is clearer using properties so I have downloaded it and added a reference to it. The problem is that when adding the reference to my .NET Framework 3.5 project I get a warning icon. From the above page where I have downloaded

Command Line Parser Library - Boolean Parameter

二次信任 提交于 2019-12-01 15:08:38
I try to pass a boolean parameter to a console application and process the value with the Command Line Parser Library . [Option('c', "closeWindow", Required = true, HelpText = "Close the window.")] public bool CloseWindow { get; set; } I tried to pass the parameter as -c false -c False -c "false" -... There are no differences, on each try I get "true" as value. Can anyone tell me how I have to pass the parameter to get the boolean false value? To avoid possible asks, there is a string option which is passed correctly: [Option('s', "system", Required = true, HelpText = "Any help text")] public

Command Line Parser Library - Boolean Parameter

∥☆過路亽.° 提交于 2019-12-01 14:41:05
问题 I try to pass a boolean parameter to a console application and process the value with the Command Line Parser Library. [Option('c', "closeWindow", Required = true, HelpText = "Close the window.")] public bool CloseWindow { get; set; } I tried to pass the parameter as -c false -c False -c "false" -... There are no differences, on each try I get "true" as value. Can anyone tell me how I have to pass the parameter to get the boolean false value? To avoid possible asks, there is a string option