3 ms·
Not sure what you mean by "delegates can't accept generic type parameters" because you can certainly make a delegate with a <T> in it in C#
by zzbzq 9y ago
Not sure what you mean by "delegates can't accept generic type parameters" because you can certainly make a delegate with a <T> in it in C#
- naasking 9y agoThere is no delegate equivalent of passing around an instance of IFoo: interface IFoo { void Bar<T>(); } This is known as first-class polymorphism. Classes with methods are strictly more powerful than delegates, but they shouldn't be. It's even worse than that actually, because you can't even create an open instance delegate to a generic interface or abstract class method (you'll get a runtime error, not even a static error).