// 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() { {1,"A"}, {2,"BB"}, {3,"CCC"} }; foreach(KeyValuePair kvp in dic) { Console.WriteLine(kvp.Key + " -> " + kvp.Value); } } } }