# HashSet&lt;T>

An unordered collection that keeps only unique values.

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

**HashSet&lt;T>** — An unordered collection that keeps only unique values.

```csharp
class TagCollection
{
    HashSet<string> tags = 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/hashset-t
