I am developing a Windows Phone 8 application where I use portable class libraries. There seems to be no linq-support for these kind of projects.
Is there a good/recommended way to search for an item in a list based on a property value?
If i get it right, I can't use something like: list.Find(i => i.ID == someValue);
Edit: I'm currently using foreach
but would like to know if there is another solution.
The PCL settings are: .NET 4.5, Silverlight 4, Windows Phone 7.5 and Windows Store
Because you don't need Xbox then you can use LINQ in PCL. Blog post explaining restrictions when using PCL.
LINQ code:
list.FirstOrDefault(i=>i.ID==someValue);