When I write this code it allow me
IEnumerable<object> creator = new List<string>();
But when I write
IEnumerable<object> creator = new List<int>();
it shows compile time error:
Error CS0266 Cannot implicitly convert type 'System.Collections.Generic.List' to 'System.Collections.Generic.IEnumerable'. An explicit conversion exists (are you missing a cast?)
I don't know why it is happening.