Equivalent:
var last = list.FindLast(predicate);
is an
var last = sequence.Where(predicate).LastOrDefault();
(The latter will have to check all the elements in the sequence, however ...)
In fact, “Where ()” is part of the “Search”, and “Last ()” is the last part of “FindLast”, respectively. Similarly, it FindFirst(predicate)will display on sequence.Where(predicate).FirstOrDefault(), but it FindAll(predicate)will sequence.Where(predicate).
source
share