C#
C# DataTable中返回列中的最大值
此处以表dt2中的keyIndex列(int类型)为例1、通过linq来实现intmaxKeyIndex=dt2.AsEnumerable().Select(t=>t.Field<int>("keyIndex")).Max();Linq语法:点击打开链接2、通过Compute方法来实现intee=(int)dt2.Compute("Max(keyIndex)","true");C