public bool Contains (int selectedIndex) { foreach (int index in selection) if (index == selectedIndex) return true; return false; }