网上看到一个解决方法,感觉不错:
privateDataTableGetNewDataTable(DataTabledt,stringcondition)
{
DataTablenewdt=newDataTable();
newdt=dt.Clone();
DataRow[]dr=dt.Select(condition);
for(inti=0;i<dr.Length;i++)
{
newdt.ImportRow((DataRow)dr[i]);
}
returnnewdt;//返回的查询结果
}
