+Generic interfaces can inherit from non-generic interfaces. In the .NET class library, <xref:System.Collections.Generic.IEnumerable%601> inherits from <xref:System.Collections.IEnumerable>. When a generic interface inherits from a non-generic interface, the type parameter replaces `object` in the overridden members. For example, <xref:System.Collections.Generic.IEnumerable%601> uses `T` in place of `object` in the return value of <xref:System.Collections.Generic.IEnumerable%601.GetEnumerator%2A> and in the <xref:System.Collections.Generic.IEnumerator%601.Current%2A> property getter. Because `T` is used only in output positions in these members, <xref:System.Collections.Generic.IEnumerable%601> can be marked as covariant. If `T` were used in an input position in an overridden member, the interface couldn't be covariant, and the compiler would generate an error.
0 commit comments