I have a list which contains a collection of objects.
How can I search for an item in this list where object.Property == myValue?
I have a list which contains a collection of objects.
How can I search for an item in this list where object.Property == myValue?
list.FirstOrDefault(i => i.property == someValue);
This is based on Drew's answer above, but a little more succinct.