SortedSet is one class that is been added to the .Net class library 4.0 which actually merges the behaviour of HashSet and SortedList together. It maintains the sorted ordering of the list without affecting performance.
Lets see how it works :
SortedSet sorted = new SortedSet { 1, 43, 65, 23, 44, 56, 43, 1, 56, 66, 24 };
foreach(int number in sorted)
{
Console.WriteLine(number);
}
Console.Read();
Read more: Daily .Net Tips
QR:
Lets see how it works :
SortedSet
foreach(int number in sorted)
{
Console.WriteLine(number);
}
Console.Read();
Read more: Daily .Net Tips
QR: