C# language feature:
applies to
benefit
how to use
<T>
after class name and specify Type T
where desired within class.note
<T1, T2>
example:
class GenericList<objectType>{ // 1) Insert `<T>` after class name and
public void Add(objectType listObject) { } // specify Type `T` where desired within class.
}
class Use_of_Generic_Class_Example
{
// 2) Declare class object and specify desired type i.e int.
GenericList<int> NumberList;
}