用LINQ对Dictionary排序
摘要:
代码如下 : static void Main(string[] args) { Dictionary<int, int> di = new Dictionary<int, int>(); di.Add(9, 1); di.Add(0, 6); di.Add(2, 8); var sortedDict = (from entry in di orderby entry.Key ascending select entry) .T... 阅读全文
posted @ 2013-03-25 00:26 齐文宣 阅读(304) 评论(0) 推荐(0)