# Where()

A LINQ operation that keeps only items satisfying a condition.

## What does **Where()** do in C#?

**Where()** — A LINQ operation that keeps only items satisfying a condition.

```csharp
class NameFilter
{
    IEnumerable<string> ShortNames(IEnumerable<string> names)
    {
        return names.Where(name => name.Length < 5);
    }
}
```

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/where
