commandlineparser / commandlineparser/commandline

Issue with boolean switch after verb

オープン
#778 コメント 5 件 リアクション 4 件 担当者 0 名 GitHub で見る
主要言語
C#
スター
4.8k
フォーク
478
PR マージ指標
30日以内にマージされた PR はありません

説明

**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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。