dotnet / dotnet/command-line-api

Type mismatch between string and string array to error out

Open
#787 4 comments 0 reactions 0 assignees View on GitHub
Area-Parser and Binder
Dominant language
C#
Stars
3.7k
Forks
428
PR merge metrics
No merged PRs in 30d

Description

Noticed at https://github.com/dotnet/format/pull/551#discussion_r379924103, if `option.Argument = new Argument(() => null)` is used and the target delegate's signature has `string[]`, it can be an error so the user knows that API is not going to work as expected.

```
myApp --myStringArrayArg val1 val2 val3
```

will only function properly at runtime with `option.Argument = new Argument(() => null)`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.