Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
List<MyClass> matches = new List<MyClass>();
foreach(MyClass item in items){
if(item.Category == selectedCategory)
{
matches.Add(item);
}
}
var matches = items.Where(x=>x.Category==selectedCategory);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment