As we already know that Dictionary works based on Key, Value pair. It provides us great flexibility to deal with lists or nested lists. Sorting a dictionary based on key is very easy but how would we sort it based on its value, I have designed a sample for a hint for you guys to help you with it.
Output
You can also apply other options on other datatypes like StartsWith, Contains etc...
Dictionary<string, int> Dict = new Dictionary<string, int>(); Dict.Add("James", 1); Dict.Add("Lisa", 4); Dict.Add("Ann", 2); Dict.Add("Rick", 3); var sortedDict = from x in Dict orderby x.Value ascending select x;
Output
You can also apply other options on other datatypes like StartsWith, Contains etc...
Wynn Las Vegas and Encore Casino, Nevada - MapYRO
ReplyDeleteThe Wynn is a casino 광주 출장마사지 on the Las 상주 출장샵 Vegas Strip and is a 하남 출장안마 luxury resort with close proximity to Fashion Show Mall and 구미 출장안마 Sands 전라북도 출장샵 Expo Convention Center.Renovated in: 2002, 2005, 2010, 2011Construction started: 2001