Skip to content

Instantly share code, notes, and snippets.

@slynch13
Created December 31, 2013 04:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slynch13/8192749 to your computer and use it in GitHub Desktop.
Save slynch13/8192749 to your computer and use it in GitHub Desktop.
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