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

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

posted on 2019-06-12 15:01  mol1995  阅读(608)  评论(0编辑  收藏  举报

导航