3 ms·
I briefly thought "oh yeah, mixins, shame we can't do that in C# with single inheritance" and then realized that's what extension methods are for (and slightly
by pjc50 1y ago
I briefly thought "oh yeah, mixins, shame we can't do that in C# with single inheritance" and then realized that's what extension methods are for (and slightly more general).
I have some C# code which relies on calling an extension method on a null instance, which is mildly naughty but saves a lot of refactoring.