▁type ▁does ▁not ▁support ▁comparison . ▁The ▁interface ▁provides ▁the ▁generic ▁method ▁Comp are To ( T ). ▁ ▁The ▁above ▁method ▁could ▁also ▁be ▁written ▁without ▁generic ▁types , ▁simply ▁using ▁the ▁non - generic ▁Array ▁type . ▁However , ▁since ▁arrays ▁are ▁cont rav ari ant , ▁the ▁casting ▁would ▁not ▁be ▁type ▁safe , ▁and ▁compiler ▁may ▁miss ▁errors ▁that ▁would ▁otherwise ▁be ▁caught ▁while ▁making ▁use ▁of ▁the ▁generic ▁types . ▁In ▁addition , ▁the ▁method ▁would ▁need ▁to ▁access ▁the ▁array ▁items ▁as ▁objects ▁instead , ▁and ▁would ▁require ▁casting ▁to ▁compare ▁two ▁elements . ▁( For ▁value ▁types ▁like ▁types ▁such ▁as ▁int ▁this ▁requires ▁a ▁box ing ▁conversion , ▁although ▁this ▁can ▁be ▁worked ▁around ▁using ▁the ▁Compar er < T > ▁class , ▁as ▁is ▁done ▁in ▁the ▁standard ▁collection ▁classes .) ▁ ▁A ▁notable ▁behavior ▁of ▁static ▁members ▁in ▁a ▁generic ▁. NET ▁class ▁is ▁static ▁member ▁instanti ation ▁per ▁run - time ▁type ▁( see ▁example ▁below ). ▁▁▁▁▁ ▁// A ▁generic ▁class ▁▁▁▁ ▁public ▁class ▁Gen Test < T > ▁▁▁▁ ▁{ ▁▁▁▁▁▁▁▁ ▁// A ▁static ▁variable ▁- ▁will ▁be ▁created ▁for ▁each ▁type ▁on ▁ref raction ▁▁▁▁▁▁▁▁ ▁static ▁Count ed Inst ances ▁One Per Type ▁= ▁new ▁Count ed Inst ances (); ▁▁▁▁▁▁▁▁▁ ▁// a ▁data ▁member ▁▁▁▁▁▁▁▁ ▁private ▁T ▁m T ; ▁▁▁▁▁▁▁▁▁ ▁// simple ▁constructor ▁▁▁▁▁▁▁▁ ▁public ▁Gen Test ( T ▁p T ) ▁▁▁▁▁▁▁▁ ▁{ ▁▁▁▁▁▁▁▁▁▁▁▁ ▁m T ▁= ▁p T ; ▁▁▁▁▁▁▁▁ ▁} ▁▁▁▁ ▁} ▁▁▁▁▁ ▁//