You must indicate that both T and K are reference types. Array covariance only works with reference types. Change the announcement to:
class Dummy<K,T> where T : class, K
and it works great. You do not need to indicate that K is a reference type, because if T is a reference type, and it comes from or implements K, then K must also be a reference type. (At least I assume the reasoning. This will not hurt to add where K : class , as well as for clarity.)
Jon skeet
source share