Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public IEnumerable<string> GetThrash(Dictionary<string, int> source)
- {
- Dictionary<string, int> temp = new Dictionary<string, int>();
- foreach (var item in source)
- {
- if (item.Value > 60)
- {
- temp.Add(item.Key, item.Value);
- }
- }
- temp.ToList().Sort(new Comparison<KeyValuePair<string, int>>(
- (KeyValuePair<string, int> a, KeyValuePair<string, int> b)
- =>
- {
- return a.Value - b.Value;
- }
- ));
- foreach (var item in temp)
- {
- yield return item.Key;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement