//这个是集合 Dictionarylist = new Dictionary (); //升序 Dictionary dic_asc = list.OrderBy(p => p.Key).ToDictionary(p => p.Key, o => o.Value); //降序 Dictionary dic_desc = list.OrderByDescending(p => p.Key).ToDictionary(p => p.Key, o => o.Value);

//这个是集合 Dictionarylist = new Dictionary (); //升序 Dictionary dic_asc = list.OrderBy(p => p.Key).ToDictionary(p => p.Key, o => o.Value); //降序 Dictionary dic_desc = list.OrderByDescending(p => p.Key).ToDictionary(p => p.Key, o => o.Value);