日期:2014-05-18 浏览次数:20674 次
var num = Enumerable.Range(1, 20) .Select(x => new { v = x, k = Guid.NewGuid().ToString() }).ToList() .OrderBy(x => x.k) .Select(x => x.v) .Take(10).ToList(); foreach (var i in num) { Console.WriteLine(i); }
------解决方案--------------------