Generic variance doesn't apply to value types, basically. So while you can
You'd need to box each value:
IEnumerable<IComparable> test3 = t2.Cast<IComparable>();
So while this is valid because string
is a reference type:
List<string> strings = new List<string>();
IEnumerable<IComparable> comparables = strings;
... the equivalent doesn't work for List<int>
, and you need to box as you go.