# Generics: a Box for Any Type

How C#, Java and TypeScript write one class that works for any type of item, read aloud as "a list of snacks", and why Python and JavaScript don't need the label.

![Cheat sheet: Generics: a Box for Any Type](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/f03ccd25c5ed4080ac97f1dbf48dcfca.webp)

- Category: Data Structures
- Level: Apprentice
- Tags: Class (oop), c-sharp, Generics (software-development), java, JavaScript, python, typescript
- Updated: November 3, 2026

Source: https://www.ask-codey.com/cheat-sheets/ds-code-you-need-generics-cheat-sheet
