Table of contents



Variance in Generics
Covariance
Contravariance
Invariance
References








Variance in Generics


Variance in generics refers to how subtyping relationships behave when they are wrapped in a generic container or function. E.g. if Cat is a subclass of Animal, then subtype polymorphism which you may already be familiar...