Equivalent of TreeSet in Java to C#.net

I think there is no treeset in C#.

There was similar question asked in msdn, check that may be useful. http://social.msdn.microsoft.com/forums/en-US/netfxbcl/thread/823c46ca-4a60-4429-a606-e76c3195d4cc/


That would be System.Collections.Generic.SortedSet<T>.

It does have the methods and complexity guarantees that one would expect from a balanced tree-backed data structure. You can find maximum, minimum, iterate through all elements in order, everything.

See Add to SortedSet<T> and its complexity for more on that.