62,046
社区成员
发帖
与我相关
我的任务
分享
for(int i=0;i <arraylist.coun;i++)
{
for(int j=0;j <dt.rows.count;j++)
{
if(arraylist[i].tostring()!=dt.rows[j][0].tostring())
{
dt.rows.removeat(j)
i--;//移除之后将下标减1
break;
}
}
}
int x = dt.Rows.Count - 1;
for (int i = x; i >= 0 ; i--)
{
try
{
dt.Rows.RemoveAt(i);
break;
}
catch (Exception ex)
{ }