This is something I encountered while using the C# IList collections
IList<MyClass> foo = new List<MyClass>();
var bar = new List<MyClass>();
foo.AddRange() // doesn't compile
bar.AddRange() // compile
As far as I know, in C# (on the contrary of C++) when we create an object with this syntax, the object type get the right side (assignment) and not the left one (declaration).
Do I miss something here !
EDIT
I still don't get it, even after your answers, foo and bar have the same type !

foois of typeIList<>notList<>