不是什么好文章,仅是自己菜鸟才会出现的,不入大侠法眼。 remove执行后直接从集合中删除当前行 故foreach不得不舍弃Code1int c=dt.count;2int r=0;3for(i=0;i<c;i++)4 {5 if(a=true)6 dt.remove(dt.rows[r]);7 else8 r++;9 } 转载于:https://www.cnblogs.com/jinzhao/archive/2007/12/17/994895.html