Click here to Skip to main content
15,789,776 members
Articles / Programming Languages / C#

SortedBucketCollection: A memory efficient SortedList accepting multiple items with the same key

Rate me:
Please Sign up or sign in to vote.
5.00/5 (7 votes)
12 Nov 2021CPOL11 min read 6.3K   103   8  
A detailed guide how to write your own collection.
Sometimes, the collections available cannot meet your requirements and you have to write your own. This article explains how to write your own collection in detail, covering some advanced topics. The implemented collection works like a SortedDirectory, but allows for 2 keys per item and only the combination of the 2 keys needs to be unique. This is helpful when for example items should be stored and retrieved per day when they were created.


Daily Counts


Weekly Counts


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Written By
Software Developer (Senior)
Singapore Singapore
Retired SW Developer from Switzerland living in Singapore

Interested in WPF projects.

Comments and Discussions