CheckedListBox was created before the introduction of generics, so the Items collection returns objects, not a strongly typed ListItem. Fortunately, fixing this with LINQ is relatively easy using OfType () (or Cast) methods:
IEnumerable<int> allChecked = (from ListItem item in CheckBoxList1.Items.OfType<ListItem>() where item.Selected select int.Parse(item.Value));
source share