Try this:
private void checkedListBox1_SelectedIndexChanged(object sender, EventArgs e)
{
int selNdx = checkedListBox1.SelectedIndex;
foreach(int cbNdx in checkedListBox1.CheckedIndices)
{
if(cbNdx != selNdx)
{
checkedListBox1.SetItemChecked(cbNdx, false);
}
}
}
By using the 'CheckedIndices property of the CheckedListBox, you know which items are checked, and can test only those. Using this code, you don't have to deal with the fact that each Item in the CheckedListBox is Type 'object.