commandlineparser / commandlineparser/commandline

Issue with boolean switch after verb

Đang mở
#778 5 bình luận 4 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
C#
Star
4.8k
Fork
478
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.