During fixing bug in one project find interesting issue
IList<int> a =new List<int>();
var b = new int[2];
b[0] = 1;
b[1] = 2;
a = b;
a.Clear();
This code is throws exception on a.Clear(); I know how to fix it but I didn't clearly get all steps which leads to this NotSupported exception. And why compiler didn't throws compile time error?