I\'d like to write:
IEnumerable cars; cars.Find(car => car.Color == \"Blue\")
Can I accomplish this with extension methods? The f
You know that Find(...) can be replaced by Where / First
Find(...)
Where / First
IEnumerable cars; var result = cars.Where(c => c.Color == "Blue").FirstOrDefault();
This'll return null in the event that the predicate doesn't match.
null