# Stacks

A Stack&lt;T> hands values back newest first, last in, first out. Push adds to the top, Pop takes from the top, and Peek looks without taking. Undo is the classic use.

![Cheat sheet: Stacks](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/fa51d7d56db3456ab991b3e42a14a8ce.webp)

- Category: C#
- Level: Journeyman
- Tags: c-sharp, Stack&lt;T>
- Updated: November 3, 2026

Source: https://www.ask-codey.com/cheat-sheets/advanced-collections-in-csharp-stacks-cheat-sheet
