I have two classes
class Base
{
}
class Derived : Base
{
}
Base base = new Derived(); no compilation error
if I do ICollection<Base> collBase = new List<Derived>(); it gives the compilation error. Is there any other alternatives to solve this?