C# language feature:
applies to
benefit
- Facilitates code reuse, type safety, and performance. Generics are commonly used with collection classes.
how to use
- 1) Insert
<T>
after class name and specify Type T
where desired within class.
- 2) Declare class object and specify desired type.
note
- Multiple types may be specified e.g.
<T1, T2>
example: