끌림

Dictionary sort 정렬 본문

Programming/C#

Dictionary sort 정렬

소닉럽 2018. 7. 20. 14:59

Dictionary<string, int> dd = new Dictionary<string, int>();
dd.Add("key", 10);
           

List<KeyValuePair<string, int>> myList = new List<KeyValuePair<string, int>>(dd);
//myList.Sort((first, next) => { return first.Value.CompareTo(next.Value); });  // <=  정렬 방법 적절히 수정. 
//myList.Sort((next, first) => { return first.Value.CompareTo(next.Value); });  // <=  정렬 방법 적절히 수정.

Comments