c# - Why does HttpSessionState not implement IDictionary? -



c# - Why does HttpSessionState not implement IDictionary? -

httpsessionstate appears typical key -> value collection, why not implement idictionary-interface?

background: trying output/save context of asp.net website when error occurs , wanted recursive function, outputs collection , containing collections. because httpsessionstate implements icollection , ienumerable, losing info keys if want in generic manner (= working interfaces).

idictionary implies target collection capable of quick lookups key. (as far aware) httpsessionstate list of items, not dictionary style structure. search of construction take linear time there's no reason treat dictionary. if need lot of quick lookups re-create keys , values true dictionary. if don't need quick lookups, you'll need specialize class.

there more things interface list of method prototypes. there semantics need preserved interface too. quick lookups key 1 such non-explicit assumption (most) consumers of idictionary.

c# .net asp.net session dictionary

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -