List<int> l2 = l1.FindAll(x => x > 6);
x => x > 6 is a lambda expression acting as a predicate that makes sure that only elements above 6 are returned.
Put Multiple Statements in a Statement Lambda
This modified text is an extract of the original Stack Overflow Documentation created by following contributors
and released under CC BY-SA 3.0