2013年10月14日

Select与SelectMany的区别

摘要: Select() 和 SelectMany() 的工作都是依据源值生成一个或多个结果值。Select() 为每个源值生成一个结果值。因此,总体结果是一个与源集合具有相同元素数目的集合。与之相反,SelectMany() 将生成单一总体结果,其中包含来自每个源值的串联子集合。作为参数传递到 SelectMany() 的转换函数必须为每个源值返回一个可枚举值序列。然后,SelectMany() 将串联这些可枚举序列以创建一个大的序列。string[] text ={ "Albert was here", "Burke slept late", "C 阅读全文

posted @ 2013-10-14 16:31 itjeff 阅读(9661) 评论(0) 推荐(0) 编辑

c#中 ==与equals有什么区别

摘要: 对于值类型、引用类型来说比较过程怎样的?using System;using System.Collections.Generic;using System.Text;namespace ConsoleApplication1{ class Person { private string name; public string Name { get { return name; } set { name = value; } } public Person(string name) { this.name = name; } }class Program { static voi... 阅读全文

posted @ 2013-10-14 13:52 itjeff 阅读(317) 评论(0) 推荐(0) 编辑

导航