public class A
{
}
public class B:A
{
}
public class Program
{
public static void Main(String[] args)
{
List<A> my = new List<B>();
}
}
As we can store derived class's reference to base class reference. Here as the list is the array of references we should be able to store references as shown above. Please Clarify. Thanks in advance.