/// <summary> /// Sets the Selected property of each item to true for each of the given matching int values. /// </summary> /// <param name="checkBoxList">The check box list.</param> /// <param name="values">The values.</param> public static void SetValues(this CheckBoxList checkBoxList, IEnumerable <int> values) { checkBoxList.SetValues(values.Select(v => v.ToString()).ToList()); }