Enumerable.Cast<T> は int を long にキャストできない
Enumerable.Cast
$ csharp Mono C# Shell, type "help;" for help Enter statements below. csharp> var xs = new[] { 1 }; csharp> xs.Cast<long>(); // System.InvalidCastException
Enumerable.Cast
csharp> int x = 10; csharp> object o = x; // ボックス化 csharp> long b = (long)o; // だめ。System.InvalidCastException csharp> long b = (int)o; // OK csharp> b 10