Where filter

suggest change

Where returns a sequence of the elements that meet the predicate. It does not run until the sequence is enumerated.

Example

var personNames = new[] 
{
    "Foo", "Bar", "Fizz", "Buzz"
};

var namesStartingWithF = personNames.Where(p => p.StartsWith("F"));
Console.WriteLine(string.Join(",", namesStartingWithF));

Output:

Foo,Fizz

View Demo

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents