Advertisement
NedyalkoKikov

DictinariesWithLists

Jun 7th, 2016
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace DictinariesWithLists
  8. {
  9. class DictinariesWithLists
  10. {
  11. static void Main()
  12. {
  13. Dictionary<string, List<int>> dict = new Dictionary<string, List<int>>();
  14. dict["Jack Johnson"] = new List<int>() { 5, 5, 5, 6 };
  15. dict["Micheal Bay"] = new List<int>() { 6, 6, 6, };
  16. dict["John Atansov"] = new List<int> { 4, 6, 6, 6 };
  17. foreach(var d in dict)
  18. {
  19. Console.WriteLine("{0} = {1}",d.Key,string.Join(", ",d.Value));
  20. }
  21. }
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement