Allow to omit generic type parameters partially #9639
Replies: 1 comment 1 reply
-
Duplicate of #8968. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently in CSharp if you have a generic method with multiple generic type parameters. You can either have to pass all type parameters explicitly or omit all parameters, if they can be derived implicitly.
If only a part of the type parameters can be derived implicitly you still have to pass them explicitly.
Example:
Lets say we have a result interface like this:
No I have an extension method like this:
If I want to use this extension method I have to explicitly set both generic parameters:
Instead it would be helpful, if we could just omit the first parameter, like this for example:
or this:
or this:
Beta Was this translation helpful? Give feedback.
All reactions