bool FilterByTag (Note note) { if (selected_tags.Count == 0) return true; // FIXME: Ugh! NOT an O(1) operation. Is there a better way? foreach (Tag tag in note.Tags) { if (selected_tags.ContainsKey (tag)) return true; } return false; }