List<int> OrderIDList1 = (from d in ds.Tables[0].AsEnumerable() select d.Field<int>("OrderID")).ToList();
List<int> OrderIDList2 = ds.Tables[0].AsEnumerable().Select(i => i.Field<int>("OrderID")).ToList();
两种都可以获取OrderID列的值。
标签:OrderID,ToList,Field,Tables,C#,AsEnumerable,获取,DataTable From: https://www.cnblogs.com/sunice/p/17498956.html