private void AddItemToSearchFor(ObjectTypes o, ObjectTypes initialState) { SearchForCustomItem item = new SearchForCustomItem(typeNames[o], o); bool on = ((initialState & o) == o); checkedListBox.Items.Add(item, on); }