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.

Était-ce utile?

La 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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top