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<int> sorted = new SortedSet<int> { 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:
foreach(int number in sorted)
{
Console.WriteLine(number);
}
Console.Read();
Read more: Daily .Net Tips
QR:
0 comments:
Post a Comment