NedyalkoKikov

DictionariesWithStrings

Jun 7th, 2016
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 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, string> phonebook = new Dictionary<string, string>();
  14. phonebook["John Smith"] = "+1-555-8976";
  15. phonebook["Lisa Ann"] = "+1-5585-99969";
  16. phonebook["Sam Doe"] = "+1-7746-5596";
  17. foreach(var ph in phonebook)
  18. {
  19. Console.WriteLine("{0} --> {1}",ph.Key,ph.Value);
  20. }
  21. }
  22.  
  23.  
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment