Skip to content
Discussion options

You must be logged in to vote

Action and Func aren't two delegates, there are 34 separate delegates, one for each arity of parameters. Every delegate type can only have one signature. With generics and generic type parameters it is possible to extend those signatures to support multiple simple use cases, but you can't use generics to change the nature of the parameter, such as making it ref or params. That requires a different delegate type.

It does sound like you're suggesting something like variadic generic parameters, such as dotnet/roslyn#5058.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@iam3yal
Comment options

Answer selected by JustNrik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants