ToList()什么时候用?1.当需要对返回的结果进行操作时(比如foreach()操作),可以将这个结果先ToList(),这样可以提高程序运行速度。2.当不需要对结果进行操作时,直接返回IEnumerable对象即可。?:运算符需要返回的结果是Nullable类型的值时怎么办?decimal?
...
分类:
其他好文 时间:
2014-05-09 18:17:48
阅读次数:
265
using System;using System.Collections.Generic;using
System.Linq;using System.Text;using System.Data.SqlClient;using
System.IO;namespace CindyDatabaseP...
分类:
数据库 时间:
2014-05-09 11:37:48
阅读次数:
378
using System;using System.Collections.Generic;using
System.ComponentModel;using System.Data;using System.Drawing;using
System.IO;using System.Linq;usi...
分类:
其他好文 时间:
2014-05-05 23:22:07
阅读次数:
290
承接上篇博文【LINQ获取树形分类的层数】。在上文中,笔者只分享了层数,在这里我把完整的实现贴出来,欢迎批评指正。先附上效果图:首先是Tree公共类publicclassTree
{publicintModuleID {get;set; }publicintParentID {get;set; }p...
分类:
其他好文 时间:
2014-05-05 23:06:02
阅读次数:
433
intersect运算返回查询结果中相同的部分exp:各个部门中有哪些相同的工种select
jobfrom accountintersectselect jobfrom researchintersectselect jobfrom
sales;minus运算返回在第一个查询结果中与第二个查询结果...
分类:
数据库 时间:
2014-05-05 11:43:37
阅读次数:
277
熟练使用SQL
Server中的各种用法会给查询带来很多方便。今天就介绍一下EXCEPT和INTERSECT。注意此语法仅在SQL Server
2005及以上版本支持。EXCEPT是指在第一个集合中存在,但是不存在于第二个集合中的数据。INTERSECT是指在两个集合中都存在的数据。之间的优先级是...
分类:
数据库 时间:
2014-05-05 11:28:08
阅读次数:
316
首先这种情况出现在应用程序启动前的方法里面。本想通过发射来实现一些功能。谁知道被这个坑了。碰到这种问题。已经相当无语了。同时也不知道该如何解决。望有能之士帮忙解答using
System;using System.IO;using System.Linq;using System.Reflectio...
分类:
Web程序 时间:
2014-05-04 20:24:23
阅读次数:
433
using System;using
System.Collections.Generic;using System.Linq;using System.Text;using
System.Web;using System.Collections.Specialized;namespace NewX...
分类:
Web程序 时间:
2014-05-04 19:04:08
阅读次数:
437
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
us...
分类:
其他好文 时间:
2014-05-04 09:30:21
阅读次数:
360
using System.Collections.Generic;using
System.Collections.Specialized;using System.Linq;using System.Web;using
System.Text;using System.Web.Mvc;using ...
分类:
Web程序 时间:
2014-05-03 23:02:35
阅读次数:
492