METHOD

List.FindAll

Returns a new list of matching items in source order without changing the source.

Formal Syntax & Structure

csharp syntaxcsharp
List<T> FindAll(Predicate<T> match)

Working Example

Example Snippetcsharp
using System.Collections.Generic;var values = new List<int> { 1, 2, 3 };var matches = values.FindAll(n => n > 1);System.Console.WriteLine(matches.Count);
C# & .NET Reference