Shouldn't there be a SortedList<T>?
#126958
Unanswered
alexandrehtrb
asked this question in
General
Replies: 2 comments 2 replies
-
|
You can actually use |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
If you feel like there should be an explicit There's always one more collection type that could be exposed and most of them could be provided by external libraries instead. It being in the core libraries really depends on need/demand. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I was looking at SortedList and I noticed that it actually is a kind of Dictionary, the difference being that a SortedList allows duplicate and null "keys", whilst a Dictionary does not.
But for use cases where the key and the value are the same element, the SortedList uses more memory, as it allocates arrays for both keys and values. A
SortedList<T>would be more efficient. Shouldn't there be one?I was unsure of opening an issue for this, so I started as a discussion.
Beta Was this translation helpful? Give feedback.
All reactions