1.4.1.1 用 LINQ 处理数据
如果你已经在使用 LINQ,那么这个示例只是提醒,但我们会用它来展示一些更重要的内容。这里示例代码处理数据,使用的是标准的命令式编程风格。
Listing 1.3 Imperative data processing (C#)
IEnumerablestring>GetExpenisveProducts() {
Listst...
分类:
其他好文 时间:
2014-07-24 12:26:05
阅读次数:
183
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
namespace linq_to_xml
{
internal class Program
...
分类:
其他好文 时间:
2014-07-24 12:23:55
阅读次数:
186
yieldreturn语句返回集合的一个元素yieldbreak可停止迭代------------------------------------------------------------------Student.csusingSystem;
usingSystem.Collections.Generic;
usingSystem.Linq;
usingSystem.Text;
usingSystem.Threading.Tasks;
namespaceConsoleA..
分类:
其他好文 时间:
2014-07-24 10:52:36
阅读次数:
204
-----------------------------------------ListStu.csusingSystem;
usingSystem.Collections.Generic;
usingSystem.Linq;
usingSystem.Text;
usingSystem.Threading.Tasks;
usingSystem.Collections;
namespaceConsoleApplication3
{
publicclassListStu<T>
{
privateQu..
分类:
其他好文 时间:
2014-07-24 10:51:54
阅读次数:
228
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;u...
分类:
其他好文 时间:
2014-07-24 10:08:23
阅读次数:
217
using System;using System.Collections.Generic;using System.Linq;using System.Text;using WindowsFormsApplication3.DataStorge;using WindowsFormsApplicat...
分类:
其他好文 时间:
2014-07-24 09:54:53
阅读次数:
178
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace WindowsFormsApplication3.Enums{ public enum WizardButto...
分类:
数据库 时间:
2014-07-24 05:07:18
阅读次数:
211
今天在组长的带领下有个小目标,就是上午完成MVC简单增删查改的学习,下午完成不用HTML代码创建界面,经过一番查阅后发现,MVC4完成增删查改的也可以通过linq完成,而且也相对没那么复杂,只是有些地方不同而已,对MVC的模式-视图-控制器也有了初步的轮廓认识,模式指的是对数据库操作的集成,视图就....
分类:
其他好文 时间:
2014-07-24 05:06:48
阅读次数:
176
using System;using System.Collections.Generic;using System.Linq;using System.Text;using WindowsFormsApplication3.FormPage.UserMode;namespace WindowsFo...
分类:
其他好文 时间:
2014-07-24 05:04:38
阅读次数:
292
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace WindowsFormsApplication3.Enums{ public enum WizardPageT...
分类:
其他好文 时间:
2014-07-24 05:03:48
阅读次数:
267