Dictionary<string, string> dict = new Dictionary<string, string>();
dict.Add("Mango", "1");
dict.Add("Cat", "5");
dict.Add("Rat", "4");
dict.Add("Hare", "2");
dict.Add("Apple", "2");
dict = dict.OrderByDescending(u => u.Value).ToDictionary(z => z.Key, y => y.Value);
dict = dict.OrderByDescending(keySelector:u => u.Value).ToDictionary(keySelector:z => z.Key, elementSelector:y => y.Value);