▁be ▁valid ▁cont rav ari antly , ▁i . e . ▁the ▁type ▁parameter ▁ ▁must ▁not ▁be ▁tag ged ▁. ▁Similarly , ▁the ▁result ▁type ▁ ▁of ▁ ▁must ▁be ▁valid ▁cov ari antly , ▁i . e . ▁( since ▁ ▁is ▁a ▁cov ari ant ▁interface ) ▁the ▁type ▁ ▁must ▁be ▁valid ▁cov ari antly , ▁i . e . ▁the ▁type ▁parameter ▁ ▁must ▁not ▁be ▁tag ged ▁. ▁This ▁shows ▁that ▁the ▁interface ▁ ▁is ▁not ▁allowed ▁to ▁be ▁marked ▁either ▁co - ▁or ▁cont rav ari ant . ▁ ▁In ▁the ▁common ▁case ▁of ▁a ▁generic ▁data ▁structure ▁such ▁as ▁, ▁these ▁restrictions ▁mean ▁that ▁an ▁ ▁parameter ▁can ▁only ▁be ▁used ▁for ▁methods ▁getting ▁data ▁out ▁of ▁the ▁structure , ▁and ▁an ▁ ▁parameter ▁can ▁only ▁be ▁used ▁for ▁methods ▁putting ▁data ▁into ▁the ▁structure , ▁hence ▁the ▁choice ▁of ▁keywords . ▁ ▁Data ▁ ▁C # ▁allows ▁variance ▁annotations ▁on ▁the ▁parameters ▁of ▁interfaces , ▁but ▁not ▁the ▁parameters ▁of ▁classes . ▁Because ▁fields ▁in ▁C # ▁classes ▁are ▁always ▁mutable , ▁vari antly ▁parameter ized ▁classes ▁in ▁C # ▁would ▁not ▁be ▁very ▁useful . ▁But ▁languages ▁which ▁emphas ize ▁imm utable ▁data ▁can ▁make ▁good ▁use ▁of ▁cov ari ant ▁data ▁types . ▁For ▁example , ▁in ▁all ▁of ▁Scala , ▁K otlin ▁and ▁O C aml ▁the ▁imm utable ▁list ▁type ▁is ▁cov ari ant : ▁List [ Cat ] ▁is ▁a ▁sub type ▁of ▁List [ An imal ]. ▁