FatPigeon replied on Friday, February 08, 2008
I think the way to look at it is that List<Apple> and List<IFruit> both descend directly from System.Object. Neither descends from the other which would
need to be the case for EatFruit to work.
The fact is List<Apple> can contain only apples where as List<IFruit> can contain apples or oranges. A List<Apples> can never be a List<IFruit> because it cannot contain oranges and List<IFruit> can never be a List<Apple> because it can contain oranges.
The parameter type in EatFruit2 is being defined as List<Apple> by the caller so this does work.
Hope this helps.
Regards,
Patrick