private void unSelect(ListBox lstBx, BindingSource bindSrc) {
  
int[] selectedIndexs = new int[lstBx.SelectedItems.Count];
    
for (int i = lstBx.Items.Count - 1, j = 0; i >= 0; i--) {
      
if (lstBx.GetSelected(i)) {
        selectedIndexs[j
++= i;
      }
    }
    
for (int i = 0; i < selectedIndexs.Length; i++) {
      bindSrc.Remove(lstBx.Items[selectedIndexs[i]]);
    }          
}

相关文章:

  • 2021-11-16
  • 2022-02-08
  • 2022-12-23
  • 2022-12-23
  • 2021-12-15
  • 2022-12-23
  • 2022-12-23
  • 2021-08-26
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-19
  • 2021-09-15
  • 2022-12-23
  • 2021-08-11
  • 2021-10-29
相关资源
相似解决方案