giovedì 21 febbraio 2013

Sorting Hash Table - SortedDictionary

Today I needed to sorting HashTable.
Searching on "My Friend" Google :-) I found the C# Class SortedDictionary that represents a collection of key/value pairs that are sorted on the key.

Here some little example:

SortedDictionary<int, string> Your = new SortedDictionary<int, string>();

Your.Add(1, "…");

foreach (KeyValuePair<int, string> entry in Your)
{
//do something …
entry.Key
entry.Value
}

Go HERE for more info.



My Two Cents ...

Nessun commento:

Posta un commento