using System; using System.Collections; class Class1 { static void Main(string[] args) { bool ByEmp = false; SortedList Emps = new SortedList(); Emps.Add("500", "A"); Emps.Add("502", "C"); Emps.Add("501", "B"); Emps.Add("503", "D"); for(int k=0; k<Emps.Count; k++) { Console.WriteLine("\t{0}\t{1}", Emps.GetKey(k), Emps.GetByIndex(k)); } } }