C# Compiler fuckup

1 views
C#Programming

The following code compiles fine but throws an Exception at runtime.
Microsoft is aware of this issue but decided not to fix it as its basically a correct implementation of the compiler. It just messes up in this exact situation:

uint[] myArr = new uint[] { 1, 2, 3, 4 };
List myLst = new List() { 1, 2, 3, 4 };
int[] lol = (int[])myArr;
lol[0].GetType();
Console.WriteLine(myArr.Cast().Count());
Console.WriteLine(myLst.Cast().Count());

Have some fun with uint's in a int array :)

bd5e475