标签:put color lis item 子集 求和 var name vol
1.Datatable、DataRow[]、List 、List子集合、 某列求和
DataTable dt = new DataTable(); var sum1 = dt.Compute("SUM(Volume)", ""); DataRow[] drList = dt.Select("Name=‘AAA‘"); var sum2 = drList.Sum(x => x.Field<decimal>("Volume")); var tJlbList = new List<TJlb_Mod>(); var sum3 = tJlbList.Sum(o => o.FBcfs); var sum4 = tJlbList.SelectMany(x => x.TJlb_P_Items).Sum(o => o.FBcfs);
标签:put color lis item 子集 求和 var name vol
原文地址:https://www.cnblogs.com/sky-gfan/p/14700331.html