WSWSVoucher [] wswsv = new WSWSVoucher[4];wswsv= wswsv.OrderBy(s => s.creditAmount).ToArray();wswsv= wswsv.OrderByDescending(s => s.creditAmount).ToAr...
                            
                            
                                分类:
其他好文   时间:
2014-06-26 00:44:03   
                                阅读次数:
220
                             
                    
                        
                            
                            
                                一个对象能自己能否作为自己的一个成员?using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace ConsoleApp...
                            
                            
                                分类:
其他好文   时间:
2014-06-26 00:27:11   
                                阅读次数:
169
                             
                    
                        
                            
                            
                                using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using ...
                            
                            
                                分类:
Web程序   时间:
2014-06-25 21:16:23   
                                阅读次数:
263
                             
                    
                        
                            
                            
                                LINQ to SQL和Entity Framework都是一种包含LINQ功能的对象关系映射技术。他们之间的本质区别在于EF对数据库架构和我们查询的类型实行了更好的解耦。使用EF,我们查询的对象不再是完全对应数据库架构的C#类,而是更高层的抽象:Entity Data Model。这为我们提供了额外的灵活性,但是在性能和简单性上面也会有所损失。
LINQ to SQL由C#团队开发并在.N...
                            
                            
                                分类:
数据库   时间:
2014-06-24 17:57:56   
                                阅读次数:
278
                             
                    
                        
                            
                            
                                第一部分,什么是Linq to sql Linq to sql(或者叫DLINQ)是LINQ(.NET语言集成查询)的一部分,全称基于关系数据的.NET语言集成查询,用于以对象形式管理关系数据,并提供了丰富的查询功能,它和Linq to xml、Linq to objects、Linq to dat...
                            
                            
                                分类:
数据库   时间:
2014-06-24 09:21:25   
                                阅读次数:
388
                             
                    
                        
                            
                            
                                using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.IO;using System.Linq;usi...
                            
                            
                                分类:
其他好文   时间:
2014-06-23 00:51:01   
                                阅读次数:
334
                             
                    
                        
                            
                            
                                //基类
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MVATwentyQuestions
{
    class Test
    {
        public string _nam...
                            
                            
                                分类:
其他好文   时间:
2014-06-22 20:23:05   
                                阅读次数:
186
                             
                    
                        
                            
                            
                                我们读取和写入Excel 经常使用NPOI工具,如果我们的需求只是需要读取Excel,可以考虑使用LinqToExcel这个组件。这个组件用起来简单,实用,操作方便,而且结合了Linq的查询特性,excel版本不仅支持2003,而且连wps表格都支持(后缀名为.et),csv文件更不在话下了。项目地...
                            
                            
                                分类:
其他好文   时间:
2014-06-22 13:13:16   
                                阅读次数:
307
                             
                    
                        
                            
                            
                                使用Linq提供的扩展方法Distinct可以去除序列中的重复元素。
该方法具有以下两种重载形式:
(1)public static IEnumerable Distinct(this IEnumerable source) (重载1)
通过使用默认的相等比较器对值进行比较并返回序列中的非重复元素。
(2)publicstatic IQueryable Distinct(this IQue...
                            
                            
                                分类:
其他好文   时间:
2014-06-22 11:07:47   
                                阅读次数:
258
                             
                    
                        
                            
                            
                                LinQ to Object是指对任意IEnumerable或Ienumerable集合使用linq查询.它可代替查询任何可枚举的集合.如List,Array或Dictionary. 
LINQ的优点
  和foreache相比有三个优点
它们更简明、更易读,尤其在筛选多个条件时。它们使用最少的应用程序代码提供强大的筛选、排序和分组功能。无需修改或只需做很小的修改即可...
                            
                            
                                分类:
其他好文   时间:
2014-06-22 08:56:16   
                                阅读次数:
170