NedyalkoKikov

DictionaryDemo

May 16th, 2016
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 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 Dictionary
  8. {
  9. class Dictionary
  10. {
  11. static void Main()
  12. {
  13. var phonebook = new Dictionary<string, string>();
  14. {
  15. phonebook["Ned"] = "0896727296";
  16. phonebook["Pesho"] = "12345600";
  17. phonebook["Vanya"] = "088554422";
  18. }
  19. phonebook.Add("Ivan", "458964");
  20. foreach (var item in phonebook)
  21. {
  22. Console.WriteLine("{0} - {1}", item.Key, item.Value);
  23. }
  24.  
  25.  
  26. }
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment