使用循环删除checklistbox中的选中项,很简单但是很好用,直接上代码了:
while (checkedListBox1.CheckedItems.Count>0)
{
for (int i = 0; i < checkedListBox1.Items.Count; i++)
{
if (checkedListBox1.GetItemChecked(i))
{
checkedListBox1.Items.RemoveAt(i);
}
}
}
代码现在测试没问题,有板砖尽管拍啊~~~~~~~~~~~~