今天天气不错,园子大丰收~~:

也说Linq 分组

看一个例子:from p in Products group p by p.Family  into g select g

image

那么:

   1:  from p in Products group p by p.Family  into g select g.First()
   2:  (from p in Products group p by p.Family into g select g).First()

什么结果呢?

from p in Products group p by p.Family  into g select g.First():

 image
(from p in Products group p by p.Family into g select g).First():

image

posted @ 2010-06-22 14:20  Jimson.Ma  阅读(241)  评论(0编辑  收藏  举报

Email: 20045912@163.com MSN: 20045912@163.com