Skip to content

Instantly share code, notes, and snippets.

@slpsys
Created April 16, 2011 00:18
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 slpsys/922689 to your computer and use it in GitHub Desktop.
Save slpsys/922689 to your computer and use it in GitHub Desktop.
var dict = new Dictionary<int, int>() { {1, 1}, {2, 2}, {3, 3}};
var list = from record in dict.Keys
where record > 1
select record;
foreach (var item in list)
{
dict.Remove(item);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment