Question

I have a List<> of objects. I wanted to use the method Find(Predicate match), but i did not find it in wp7.

What can i use in alternative to this method?

thank you for help.

Was it helpful?

Solution

You can use Linq instead. The equivalent of Find in Linq is FirstOrDefault:

yourList.FirstOrDefault(predicate);

Just make sure you have added using System.Linq; on top of your file, or you won't find the FirstOrDefault method.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top