DataTable CAST 成集合后,进行自定义排序再转换回DataTable

dt = dt.Rows.Cast<DataRow>().OrderBy(r => Convert.ToInt32(r["数量"])==0?1:0).ThenBy(r=>r["表名"]).CopyToDataTable();
           

原文地址:https://www.cnblogs.com/mol1995/p/11009724.html