用如下的代码也可以正确删除
int i = 0;
foreach (int indexChecked in checkedListBox.CheckedIndices)
{
checkedListBox.Items.RemoveAt(indexChecked - i);
i++; // 通过减去i来修正删除选项后的索引错误
}

相关文章:

  • 2022-12-23
  • 2021-06-07
  • 2022-12-23
  • 2021-08-07
  • 2022-12-23
  • 2021-06-26
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-09-02
  • 2022-12-23
  • 2021-12-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案