Why 4? I know its in the documentation as 4, but that just seems strange.
I'll go out on a limb and say it's because someone needed an Action or Func delegate somewhere in the framework with 4 arguments and no one has yet needed one with 5. Alternatively, someone decided that any more than 4 and you ought to introduce a class to hold the values instead as @chadmyers says.
I don't know the exact answer, but I'm guessing it has to do with the fact that if you are passing around delegates with >4 arguments, that's a code smell and you're likely doing something wrong. You should consider using the "Introduce Parameter Object" refactoring.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With