# Stack&lt;T>

A last-in, first-out collection where the newest value is removed first.

## 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();
}
```

Level: Freelancer · [More C# terms at this level](https://www.ask-codey.com/glossary/subjects/c-sharp/freelancer)

Updated: September 27, 2026

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