# Stack&lt;T>

*noun*

say it: **“STAK”** **/stæk/**

A C# collection where the last item added is the first one taken off: last in, first out.

## What is **Stack&lt;T>** in C#?

**Stack&lt;T>** — A last-in, first-out collection where the newest value is removed first.

```csharp
class BrowserHistory
{
    Stack<string> pages = new();
}
```

## In a sentence

- “The editor keeps undo steps in a **Stack**&lt;string>, so Undo removes the newest first.”

Level: Freelancer · [More C# terms at this level](https://www.ask-codey.com/glossary?category=c-sharp&level=4)

Updated: November 9, 2026

Source: https://www.ask-codey.com/glossary/stack-t
