/// <summary> ///当前排序 /// </summary> public void Sort(PaySortEnum pse) { List <string> listKeys = this.Keys.ToList(); listKeys.Sort(new SortCamparer(pse)); PayDictionary pd = new PayDictionary(); foreach (string r in listKeys) { pd.Add(r, this[r]); } this.Clear(); foreach (string r in listKeys) { this.Add(r, pd[r]); } pd.Clear(); pd = null; }
public SortCamparer(PaySortEnum p) { pse = p; }