标签:os 数据 for ar sp table return c
private DataTable Display(DataTable dtSource)
{
DataTable dtTemp = dtSource.Copy();
foreach (DataRow dr in dtSource.Rows)
{
DataRow[] drRepeat = dtTemp.Select("AA=‘" + dr["AA"].ToString().Trim() + "‘ and BB=‘" + dr["BB"].ToString().Trim() + "‘");
if (drRepeat.Length > 1)
{
for (int i = 0; i < drRepeat.Length - 1; i++)
{
dtTemp.Rows.Remove(drRepeat[i]);
}
}
}
return dtTemp;
}
一些常用的方法(1)--去除DataTable中的重复数据,布布扣,bubuko.com
标签:os 数据 for ar sp table return c
原文地址:http://www.cnblogs.com/mengzhixingping/p/3914243.html