惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

G
Google Developers Blog
GbyAI
GbyAI
Y
Y Combinator Blog
The GitHub Blog
The GitHub Blog
B
Blog
博客园 - 叶小钗
V
Visual Studio Blog
小众软件
小众软件
阮一峰的网络日志
阮一峰的网络日志
博客园 - 聂微东
S
SegmentFault 最新的问题
Engineering at Meta
Engineering at Meta
博客园 - Franky
V
V2EX
人人都是产品经理
人人都是产品经理
H
Hackread – Cybersecurity News, Data Breaches, AI and More
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
月光博客
月光博客
IT之家
IT之家
T
The Blog of Author Tim Ferriss
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
C
Check Point Blog
N
Netflix TechBlog - Medium
博客园 - 【当耐特】

博客园 - NanKe Sir's Blog

设置RDLC报表参数 - NanKe Sir's Blog 用SQL语句查询累计值 C#调用存储过程通用类3 Winform控件拖动 TreeView查找 在 DataGridView 中实现类似 Ctrl + F 的查找功能 正则表达式使用 Collapsing margins CSS基础 打开 mdi 窗体的子窗体 计算24点代码javascript 对数据库表进行简单的增删改查操作的通用类 C#存储过程调用 SQL连接查询AND和WHERE的不同 我为什么憎恨Framework SQL选择所最近一条记录 Sql Server 日期格式转换 INSERT INTO SELECT FROM 的用法 无法将输入 xml 文件内容转换为数据集
从绑定了数据源的 ListBox 中删除多个选定项
NanKe Sir's Blog · 2008-10-13 · via 博客园 - NanKe Sir's Blog

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]]);
    }          
}