# Where()

*noun*

say it: **“WAIR”** **/wɛr/**

The LINQ method that keeps only the items that pass a test.

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

## In a sentence

- “products.**Where**(p => p.UnitPrice &lt; 10) keeps only the cheap products.”

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