Silentdoer

导航

2015年8月31日 #

GroupJoin和Join的声明及调用

摘要: 再来看GroupJoin的声明: 阅读全文

posted @ 2015-08-31 17:19 Silentdoer 阅读(596) 评论(0) 推荐(0) 编辑

GroupBy(..)的四种声明方式的理解及调用

摘要: 这里我们以 List<Student> studs作为 source,但是注意,studs中的学生可以是分别属于不同的班级和年级 先看GroupBy的第一种声明: 第二种声明: 第三种声明: 第四种声明: 阅读全文

posted @ 2015-08-31 15:48 Silentdoer 阅读(460) 评论(0) 推荐(0) 编辑

C#Linq技术中SelectMany(...)函数的内部实现的伪代码

摘要: 我们先来假设这种场景: 一个学校中有多个年级,一个年级有多个班级,一个班级里有多个学生。这里我们只需要班级、年级、和学生这三个概念; 让我们先来定义Class类和Student类: 现在来声明多个班级: 现在来看SelectMany(...);函数的声明: 对于第一个声明:我们调用该函数的形式即为: 阅读全文

posted @ 2015-08-31 14:01 Silentdoer 阅读(766) 评论(0) 推荐(0) 编辑

C#Linq技术中SelectMany(...)的内部实现推测

摘要: 对于声明为:public static IEnumerable<TResult> SelectMany<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, IEnumerable<TResult>> selector); 阅读全文

posted @ 2015-08-31 11:58 Silentdoer 阅读(2422) 评论(0) 推荐(0) 编辑