List<Apple> listapple = new List<Apple>(); listapple.Add(new Apple() { dt = DateTime.Now.AddDays(1), geely_wsordercode = "SO01", pricetypecode = "SV100", sapValue = 100 }); listapple.Add(new Apple() { dt = DateTime.Now.AddDays(2), geely_wsordercode = "SO01", pricetypecode = "SV200", sapValue = 200 }); listapple.Add(new Apple() { dt = DateTime.Now.AddDays(3), geely_wsordercode = "SO01", pricetypecode = "SV200", sapValue = 300 }); listapple.Add(new Apple() { dt = DateTime.Now.AddDays(4), geely_wsordercode = "SO01", pricetypecode = "SV200", sapValue = 400 }); listapple.Add(new Apple() { dt = DateTime.Now.AddDays(5), geely_wsordercode = "SO02", pricetypecode = "SV100", sapValue = 500 }); listapple.Add(new Apple() { dt = DateTime.Now.AddDays(6), geely_wsordercode = "SO02", pricetypecode = "SV100", sapValue = 600 }); listapple.Add(new Apple() { dt = DateTime.Now.AddDays(7), geely_wsordercode = "SO02", pricetypecode = "SV100", sapValue = 700 });
希望用 lambda ,通过 geely_wsordercode 和 pricetypecode 分组,取最大时间的 sapValue 对应的数据,其他的都过滤掉。
摇曳的蔷薇
守候你守候我
相关分类