Invalid variance: The type parameter 'T' must be contravariantly valid on 'UserQuery.IItem<T>.ItemList'. 'T' is covariant [duplicate]
This question already has an answer here: T must be contravariantly valid 3 answers Why the property get the error while the method can be compiled? public interface IFoo {} public interface IBar<out T> where T : IFoo {} public interface IItem<out T> where T: IFoo { // IEnumerable<IBar<T>> GetList(); // works IEnumerable<IBar<T>> ItemList { get; set; } // Error! } Error: Invalid variance: The type parameter 'T' must be contravariantly valid on 'UserQuery.IItem<T>.ItemList'. 'T' is covariant. You get the compiler error because you have a property getter ( get ) and a setter ( set ). The