using System; using System.Collections.Generic; using System.Text; using System.Collections; namespace ConsoleApplication1 { class Program { publicstaticvoid Main() { SortedList sl =new SortedList(); sl["c"] =41; sl["a"] =42; sl["d"] =11; sl["b"] =13; foreach (DictionaryEntry element in sl) { string s = (string)element.Key; int i = (int)element.Value; Console.WriteLine("{0},{1}", s, i); } } } }