DataTable 排序
1)
[csharp]
dtVariable.DefaultView.Sort="VariableUsed asc";
dtVariable = dtVariable.DefaultView.ToTable();
foreach(DataRow tmpRow in dtVariable.Rows)
{
sbResult.AppendLine(tmpRow["ObjectName"].ToString() + ": VariableUsed=" + tmpRow["VariableUsed"]);
}
dtVariable.DefaultView.Sort="VariableUsed asc";
dtVariable = dtVariable.DefaultView.ToTable();
foreach(DataRow tmpRow in dtVariable.Rows)
{
sbResult.AppendLine(tmpRow["ObjectName"].ToString() + ": VariableUsed=" + tmpRow["VariableUsed"]);
}
2)
DataTable 使用sort和Distinct
http://blog.163.com/qingzi1107@126/blog/static/16958032620114422641653/
http://www.dotblogs.com.tw/tony1534/archive/2009/06/10/8771.aspx
补充:软件开发 , C# ,