// Collection of code snippets by Arne Vajhøj // (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) using System; using System.Collections.Generic; namespace E { public class Program { public static void Main(string[] args) { Dictionary dic = new Dictionary(); dic[1] = "A"; dic[2] = "BB"; dic[3] = "CCC"; foreach(KeyValuePair kvp in dic) { Console.WriteLine(kvp.Key + " -> " + kvp.Value); } } } }