日期:2014-05-18 浏览次数:20953 次
string[] id = new string[] { "11", "13" };
for (int i = 0; i < DT.Rows.Count; i++)
{
for (int j = 0; j < id.Length; j++)
{
if (DT.Rows[i]["id"].ToString() == id[j])
{
DT.Rows[i].Delete(); // 不要使用 Remove(DT.Rows[i])
}
}
}
//这里也不许+ DT.AcceptChanges() 因为还要提交