Sometimes it happens that we use mechanisms/features of specific language without beeing aware of it. That’s fine, but if you’ll want to discuss your code in a future to the audience or coworkers, soon or later you’ll be forced to learn it and understand (or at least name it using technical nomenclature). Therefore, today I’m going to discuss two related „mechanisms” of C# which are covariance and contravariance. Covariance Covariance is a type conversion from the specific type to the more general (ba...
Strona głównaSztuka programowania
Sztuka programowania 2928 dni, 58 minut temu 189 pokaż kod licznika zwiń