daily pastebin goal
3%
SHARE
TWEET

Untitled

a guest Oct 13th, 2017 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var res = maxRatingBigrams.Min(s => s.Key);
  2.    
  3. var res = maxRatingBigrams.Min((x, y) => string.CompareOrdinal(x.Key, y.Key));
  4.    
  5. SortedDictionary<string, int> dict = new SortedDictionary<string, int>();
  6.  
  7.         dict.Add("aaa", 5);
  8.         dict.Add("bbb", 7);
  9.         dict.Add("ccc", 8);
  10.         dict.Add("ddd", 8);
  11.         dict.Add("eee", 4);
  12.         dict.Add("fff", 4);
  13.  
  14.         int max = dict.Values.Max();
  15.         string keyMax = "";
  16.         foreach (string key in dict.Keys)
  17.         {
  18.             if (dict[key] == max)
  19.                 keyMax = key;
  20.         }
  21.  
  22.         Console.WriteLine(keyMax.ToString() + dict[keyMax]);
RAW Paste Data
Top