The SortedList Collection

The System.Collections.SortedList collection works like HashTable but it differs in that items can be accessed either via the key, or the index items are automatically sorted based on the key, for example, look at the following code:

image

It sorts items based on the key; therefore, it produces the following result:

Alessandro Del Sole

Get Visual Basic® 2010 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.