3 ms·
I believe that C# 4 gives you the ability to specify the co- or contra variance of a generic type.
by ecoffey 15y ago
I believe that C# 4 gives you the ability to specify the co- or contra variance of a generic type.
- procrastitron 15y agoAs does Java, but they get it wrong for arrays. I don't know if C# has that problem or not.
- deleted 15y ago[deleted]
- snprbob86 15y agoC# copied Java's mistake in this respect. You can pass an Apple[] to something accepting a Fruit[] and get a runtime exception when you try to add a Banana to the Fruit[].