software master at the intersection of technology, science and art

home

download

generics


C# has a list set of collections which may be used to store value and reference data. However, boxing/unboxing in using these collection has a large performance hit. Also there is no type checkling which may produce run time errors. Generic types also mitigate the difficulty of creating custom collection types - separate classes are not required for applicable types


Generics offer an encapsulation across classes - a powerful technigue. Also, Generics are extremely important in Linq, introduced in C# 3.0