C#4 Covariance/Contravariance

Robert Fraser fraserofthenight at gmail.com
Tue Jun 9 19:49:48 PDT 2009


bearophile wrote:
> Robert Fraser:
>> In D if you want to treat a Template!(SomeClass) as a Template!(Object), 
>> it's as easy as "cast(Template!(Object)) cast(void*) x"
> 
> How is this related to Covariance/Contravariance and in/out keywords, as shown in C#4?
> 
> Bye,
> bearophile

Errr... isn't that the point of covariance/contravariance?



More information about the Digitalmars-d mailing list