I have the following code that compiles in .NET Framework version 4.0 and above:
public abstract class MyBase { }
public class MyDerived : MyBase { }
public abs
In .Net 4.0 the IEnumerable interface was changed from:
public interface IEnumerable
To
public interface IEnumerable
Notice that the word out has been added to the generic type parameter. This means that the generic parameter is co-variant which means you can pass in a more derived type.
Covariance Enables you to use a more derived type than originally specified. You can assign an instance of IEnumerable (IEnumerable(Of Derived) in Visual Basic) to a variable of type IEnumerable
See msdn for more information