Need sorted dictionary designed to find values with keys less or greater than search value

Posted by Captain Comic on Stack Overflow See other posts from Stack Overflow or by Captain Comic
Published on 2010-04-23T11:55:14Z Indexed on 2010/04/23 12:13 UTC
Read the original article Hit count: 248

Hi

I need to have objects sorted by price (decimal) value for fast access. I need to be able to find all objects with price more then A or less than B. I was thinkg about SortedList, but it does not provide a way to find ascending or descending enumerator starting from given key value (say give me all objects with price less than $120).

Think of a system that accepts items for sell from users and stores them into that collection. Another users want to find items cheaper than $120.

Basically what i need is tree-based collection and functionality to find node that is smaller\greater\equal to provided key.

Please advice.

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET