For loop is exited before completion
[code]for (int d = 0; d <= checkedListBox1.Items.Count -1; d++)
{
if (checkedListBox1.GetItemChecked(d) == true)
{
checkedListBox1.Items.RemoveAt(d);
}
}[/code]
The for loop is completed before it's suppose to end... Why is this? I checked all the items (~20) in the checkedListBox, but when I run this code, not all the items are removed; some are left over. Why is this? I even tried removing if(checkedListBox1.GetItemChecked).