Hello, I'm trying to use .NET 4's SortedSet<T>
collection. It seems to have everything I need minus a couple things.
Q: I want to be able to fetch all elements lower or higher in comparison to a given value. In Java's TreeSet
, there are methods named tailSet
and headSet
, which perform these operations. I'd like to be able to do the same with SortedSet<T>
. The closest I can find is GetViewBetween
. However, what if I wanted to use SortedSet with string
? There is no max value of string
that I know of, yet I need to give the method an upper and lower bounds.
How could I mimic the behavior of tailSet
and headSet
using SortedSet
? Considering the implementation of SortedSet
, I'd think that these would be very easy methods to implement.
Thanks!