Facebook
From asdsad, 3 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 123
  1.    Dictionary<int, string> slownik = new Dictionary<int, string>();
  2.             slownik.Add(1, "jeden");
  3.             slownik.Add(2, "dwa");
  4.             slownik.Add(3, "trzy");
  5.             slownik.Add(4, "cztery");
  6.             slownik.Add(5, "piec");
  7.             slownik.Add(6, "szesc");
  8.             slownik.Add(7, "siedem");
  9.             slownik.Add(8, "osiem");
  10.             slownik.Add(9, "dziewięć");
  11.             slownik.Add(10, "dziesięć");
  12.             slownik.Add(11, "jedynaście");
  13.             slownik.Add(12, "dwanaście");
  14.             slownik.Add(13, "trzynaście");
  15.  
  16.  
  17.             Queue<KeyValuePair<int, string>> qq = new Queue<KeyValuePair<int, string>>();
  18.  
  19.            
  20.  
  21.            
  22.             foreach (KeyValuePair<int, string> item in slownik)
  23.  
  24.             {
  25.                 qq.Enqueue(item);
  26.  
  27.             }
  28.  
  29.             Console.WriteLine("-------------słownik-----------");
  30.  
  31.             foreach(KeyValuePair<int,string>item in qq)
  32.             {
  33.                 Console.WriteLine(item);
  34.             }
  35.  
  36.             Console.WriteLine("-------kolejka---------");
  37.  
  38.             foreach (KeyValuePair<int, string> item in qq)
  39.             {
  40.                 Console.WriteLine(item);
  41.             }
  42.