Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. dicts.SelectMany(d => d.Keys).Distinct().ToArray();
  2.  
  3. Dictionary<DateTime, double> dic = new Dictionary<DateTime, double>()
  4. {
  5. {DateTime.Now, 111}
  6. };
  7.  
  8. Dictionary<DateTime, double> dic2 = new Dictionary<DateTime, double>()
  9. {
  10. {DateTime.Now, 111}
  11. };
  12.  
  13. var list = dic.ToList();
  14. list.AddRange(dic2.ToList());
  15.  
  16. var final = list.Distinct().ToDictionary(x => x.Key, x => x.Value);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement