I have some problems in display the dictionary, as example in below:
SortedList mySL = new SortedList();
Console.WriteLine( "\t-KEY-\t-VALUE-" );
for ( int i = 0; i < myList.Count; i++ ) {
Console.WriteLine( "\t{0}:\t{1}", mySL.GetKey(i), mySL.GetByIndex(i) );
}
For the codes in above,"myList.GetKey(i), myList.GetByIndex(i)" just can work if mySL is SortedList. How about if mySL is a Dictionary as below? How to display it in same situation in program above?
Dictionary<string,double> mySL =new Dictionary<string,double>();