commandlineparser / commandlineparser/commandline
Issue with boolean switch after verb
- Lingua principale
- C#
- Stelle
- 4.8k
- Fork
- 478
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
**Issue**
When using a boolean switch after a verb, I cannot set it to false
**Example:**
app.exe install --feature=false
**Options class**
```
[Verb("install", HelpText = "Install something")]
class Options
{
[Option('f', "feature", Required = false, Default = true, HelpText = "Enable a feature")]
public bool EnableFeature { get; set; }
}
```
**Expected:**
Feature = False
**Actual result:**
Feature = True
**Demo code:**
[https://dotnetfiddle.net/lSBqxp](https://dotnetfiddle.net/lSBqxp)
**Edit1**
Add Options class code
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.