Finding an item in a List<> using C#

Viewed 166041

I have a list which contains a collection of objects.

How can I search for an item in this list where object.Property == myValue?

6 Answers
list.FirstOrDefault(i => i.property == someValue); 

This is based on Drew's answer above, but a little more succinct.

Related