Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace valami
- {
- class Program
- {
- static void Main(string[] args)
- {
- Dictionary<int, string> nev = new Dictionary<int, string>();
- nev.Add(nev.Count + 1, "Anna");
- nev.Add(nev.Count + 1, "Pista");
- nev.Add(nev.Count + 1, "Derek");
- nev.Add(nev.Count + 1, "Józsi");
- nev.Add(nev.Count + 1, "Béla");
- foreach (KeyValuePair<int, string> kvp in nev)
- {
- Console.WriteLine("Sorszám: {0}, Név: {1}", kvp.Key, kvp.Value);
- }
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement