2014-0403
class ListDistinctDemo
    {
        static void Main(string[] args)
        {
            List<Person> personList = new List<Person>(){
                new Person(3),//重复数据
                new Person(3),
                new Person(2),
                new Person(1)
            };
            //使用匿名方法
            List<Person&g 阅读全文>>
                
标签: IEqualityComparer<T> List C# District Lambda 阅读:10246
2013-0117
SQL(通用于 SQL Server
SELECT FROM Table ORDER BY NewID()

LINQ
 t in Table orderby Guid.NewGuid()t

Lambda
Table.OrderBy(x=>Guid.NewGuid())


下面是随机取去前n条数据

SQL(通用于 SQL Server

SELECT TOP n FROM Table ORDER BY NewID()< 阅读全文>>
标签: SQL LINQ Lambda 阅读:20262