O'Reilly logo
  • Ismael Lanchas thinks this is interesting:


Assuming A is convertible to B, X has a covariant type parameter if X<A> is convertible to X<B>.


With C#’s notion of covariance (and contravariance), “convertible” means convertible via an implicit reference conversion—such as A subclassing B, or A implementing B. Numeric conversions, boxing conversions and custom conversions are not included.

For instance, type IFoo<T> has a covariant T if the follow...


Cover of C# 6.0 in a Nutshell, 6th Edition


Se pueden convertir interfaces genéricas o arrays para tipos que permitan una conversión individualmente, pero no se permite para clases.