generics

Getting started with generics

Remarks#

Generics allow you to define placeholders for exact types in definitions for classes, interfaces and/or methods.

Possible subtopics:

  • Class (and structure) generics
  • Interface generics
  • Method generics
  • Constraints
  • Covariance and contravariance

Availability

Generics became available with:

  • .NET Framework 2.0 (and version 2.0 of the compact framework).
  • Java in version 5.
  • Common Lisp since it was standardised …

This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow