Home
Manage Your Code
Snippet: SortedList example (C#)
Title: SortedList example Language: C#
Description: using SortedList<int, string> Views: 157
Author: Filip K Date Added: 12/18/2008
Copy Code  
1SortedList<int, string> myList = new SortedList<int, string>();
2		
3myList.Add(1, "one");
4myList.Add(3, "three");
5myList.Add(4, "four");
6myList.Add(2, "two");
7		
8foreach (int myKey in myList.Keys)
9{
10    Console.WriteLine("myKey = " + myKey);
11}