tags:

views:

245

answers:

2

Apparently there is no generic version of a HybridDictionary.

Why is this? I always considered it to be a best-practice when you needed to store items in a dictionary, but didn't know how many items were going to be in it.

Maybe because the Dictionary<> has better performance and less overhead than the HybridDictionary, even with only a few elements in it.

Or is there a new best-practice I'm not aware of?

+1  A: 

IMO, HybridDictionary is just plain useless. Unless you're doing some microoptimizations (and even if this is the case you'd be better off with smartly indexed arrays with O(1) lookup time), there's absolutely no need in this class.

Anton Gogolev
+2  A: 

The generic dictionary replaces Hybrid. The generic variants probably are hybrids, in the sence that the store and sort data in the most efficient way considering the amount of data to store.

sindre j