Skip to content
Discussion options

You must be logged in to vote

Considering that methods can have multiple optional parameters of the same type I don't see how that could work. It also sounds like an unmitigated nightmare where it affects overload resolution.

The C# compiler does now allow you to specify optional parameters in any order by name, so the third example: Foo(Another: new AnotherObject()); does work. Is that not sufficient?

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by YairHalberstadt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2622 on October 29, 2020 07:36.