Pregunta

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.

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top