views:

86

answers:

1

I'm trying to see if a particular item in a checkedlistbox is checked or not. I assumed referencing the item would be:

var checkBox = CheckBoxCheckedListBox1.Items[0];

But that returns an object. Casting to a CheckBox throws an exeption.

Thanks!

+1  A: 

Use bool checked = CheckBoxCheckedListBox1.GetItemChecked(i) here.

Thorsten Dittmar
Thank you! I didn't know GetItemCheckState and SetItemCheckState existed!
Darwin Esq.