IDictionary implies that the target collection is able to quickly search for a key. (As far as I know) HttpSessionState is just a list of elements, not a dictionary style structure. Since the search for this structure will take linear time, there is no reason to consider it as a dictionary. If you need a lot of quick searches, copy the keys and values ββinto a real dictionary. If you don't need fast search queries, you just need to specialize in this class.
There are more to the interface than just a list of prototype methods. There is semantics that must also be preserved for the interface. A quick key search is one such implicit assumption for (most) consumers of any IDictionary .
source share