by nmilo · 4y ago · 0 comments
Compare:
> If B and C are subtypes of A, then List<T> must be invariant over T since List<B> should not be a subtype of List<A>, which can contain both B and C.
with:
> List<Cat> can't become List<Animal>, because you might add Dogs to that list!
No comments yet.