DataTable CAST 成集合后,进行自定义排序再转换回DataTable dt = dt.Rows.Cast<DataRow>().OrderBy(r => Convert.ToInt32(r["数量"])==0?1:0).ThenBy(r=>r["表名"]).CopyToDataTable();