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

也说Linq 分组

那么:

   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():

 也说Linq 分组
(from p in Products group p by p.Family into g select g).First():

也说Linq 分组

相关文章: