Hi, I want to use List.Find() on a simple collection that does not implement Find(). The naive way I thought of, is to just wrap it with a list and execute .Find(), like this:
ICollection myCows = GetAllCowsFromFarm(); // whatever the collection impl. is...
var steak = new List<Cow>(myCows).Find(moo => moo.Name == "La Vache qui Rit");
Now, 1st of all I'd like to know, C#-wise, what is the cost of this wrapping? Is it still faster to 'for' this collection the traditional way?
Second, is there a better straightforward way elegantly use that .Find()?
Cheers!