引用就不说明,直接贴上:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.ServiceModel;using System.Configuration;usi...
分类:
其他好文 时间:
2014-06-15 22:17:25
阅读次数:
226
今天看到别人的代码使用 Linq 的Distinct进行去重。发现有很多需要注意的地方。实现方式如下:Linq 的Distinct方法需要传递一个自己实现IEqualityComparer的类来作为比较器。 public static class EnumerableExtension ...
分类:
其他好文 时间:
2014-06-15 22:07:35
阅读次数:
307
1、左关联查询var lst = from m in db.信息 join d in db.明细信息 on m.单号 equals d.单号 into mi from dt in mi.DefaultIfEmpty() //dt标示右表 where m.单号 == "2014" && dt.编码.S...
分类:
其他好文 时间:
2014-06-15 21:09:49
阅读次数:
189
using System;using System.Linq;using System.Linq.Expressions;using System.Data.Objects;namespace HENANLUHENG.Framework.EntityRepository{ public interf...
分类:
其他好文 时间:
2014-06-15 19:53:41
阅读次数:
283
完成的效果图:服务器端代码:using System;using System.Collections.Generic;using System.Linq;using System.ServiceModel;using System.ServiceModel.Description;using Sy...
分类:
其他好文 时间:
2014-06-15 06:54:24
阅读次数:
287
题目
Given a set of distinct integers, S, return all possible subsets.
原题链接(点我)
解题思路
子集合问题。给一个集合 ,求出其所有的子集合。这个题也是个组合问题--老思路:递归加循环。
代码实现......
分类:
其他好文 时间:
2014-06-13 21:28:42
阅读次数:
252
LINQ to
SQL语句(1)之WhereWhere操作适用场景:实现过滤,查询等功能。说明:与SQL命令中的Where作用相似,都是起到范围限定也就是过滤作用的,而判断条件就是它后面所接的子句。Where操作包括3种形式,分别为简单形式、关系条件形式、First()形式。下面分别用实例举例下:1...
分类:
数据库 时间:
2014-06-13 19:04:32
阅读次数:
348
1 using System; 2 using
System.Collections.Generic; 3 using System.Linq; 4 using System.Collections; 5 6
namespace Demo1 7 { 8 class Program 9 ...
分类:
其他好文 时间:
2014-06-13 15:00:27
阅读次数:
241
1 using System; 2 using System.Collections.Generic;
3 using System.Linq; 4 using System.Text; 5 6 namespace 委托实现事件1 7 { 8 class
Program 9 {1...
分类:
其他好文 时间:
2014-06-13 14:58:21
阅读次数:
208
1 using System; 2 using System.Collections.Generic;
3 using System.Linq; 4 using System.Text; 5 6 namespace 委托练习 7 { 8 class Program
9 {10 ...
分类:
其他好文 时间:
2014-06-13 14:50:06
阅读次数:
244