SortedSet Sample Code In C#:
var sSet = new SortedSet{ };
//Add unsorted strings
sSet.Add("Fryan");
sSet.Add("Sisa");
sSet.Add("Auric");
sSet.Add("Juan");
//display sorted strings
foreach (string s in sSet)
{
Console.WriteLine(s);
}
Console.ReadKey();
In VB.NET:
Dim sSet As New SortedSet(Of String)
'Add unsorted strings
sSet.Add("Fryan")
sSet.Add("Auric")
sSet.Add("Sisa")
sSet.Add("Juan")
'display sorted strings
For Each s As String In sSet
Console.WriteLine(s)
Next
Console.ReadKey()
To stay up-to-date on .NET Framework 4.0 Coding Tips, subscribe now.
2 comments:
good information. Below is a link that provides good details about SortedSet
http://www.a2zmenu.com/Silverlight/Calling-JavaScript-Method-from-Silverlight.aspx
SortedSet is new collection introduced in C# 4.0.
Below link provides good details about SortedSet
http://www.a2zmenu.com/CSharp/SortedSet-Collection-Class.aspx
Post a Comment