Hi on this site I found how to delete multiple checkedbox objects in a `checklistbox`  

[How to delete multiple checked items from CheckedListBox?](https://stackoverflow.com/questions/14590726/how-to-delete-multiple-checked-items-from-checkedlistbox)

But it's not working for me.  

My previous partner who handled this project before I did saved something in Global.answer class. I have tried to modify that script like this:

```
for (int i = checkedListBoxAnswers.Items.Count - 1; i >= 0; i--) {
    if (checkedListBoxAnswers.GetItemCheckState(i) == CheckState.Checked) 
    {
        Global.answers.RemoveAt(checkedListBoxAnswers.SelectedIndex);
    }
}

```

It can delete one checkbox correctly, but when I check for two or more checkboxes, it goes wrong...
I wonder how to do it correctly.

this is my delete button

```
private void buttonDelete_Click(object sender, EventArgs e)
    {
        if (checkedListBoxAnswers.SelectedIndices.Count < 1)
        {
            MessageBox.Show(this, "Please select answer to be deleted");
        }
        else
        {
            for (int i = checkedListBoxAnswers.Items.Count - 1; i >= 0; i--)
            {
                if (checkedListBoxAnswers.GetItemCheckState(i) == CheckState.Checked)
                {
                    Global.answers.RemoveAt(checkedListBoxAnswers.SelectedIndex);
                }
            }
            updateCheckListBoxAnswers();
        }
    }

```