DEV Community


Discussion on: Universally quantified types in C#

shimmer profile image
Brian Berns Author

I think you're making this more complex than it needs to be. I'm just trying to create a scenario where you're passing a generic function (getWeight) to a non-generic method (SumWeights).

Thread Thread
slavius profile image
Slavius • Edited

Are you talking about IoC / DI? ;)

Edit: Now I remember! Your solution reminds me of Service locator pattern, which is BTW an anti-pattern. That's why I found it immediately wrong.