Skip to content

Cannot parse boolean options #238

Closed
Closed
@sliekens

Description

@sliekens

Version 2.0.261-beta

My option looks like this

[Option('t', "trusted", Default = true, SetName = "noconnectionstring", HelpText = "Specify whether the connection uses integrated security.")]
public bool IntegratedSecurity { get; set; }

No matter what I try, the parser always sets ÌntegratedSecurity to its default value true.

ConsoleApplication.exe -t false
ConsoleApplication.exe -t False
ConsoleApplication.exe -t 0

Even if I remove the part Default = true, I still get value true.

Is this a type conversion bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions