Why does not IDictionary (non-generic) inherit from IEnumerable<DictionaryEntry>?

Posted by thorn on Stack Overflow See other posts from Stack Overflow or by thorn
Published on 2010-06-18T10:51:37Z Indexed on 2010/06/18 10:53 UTC
Read the original article Hit count: 227

Filed under:
|
|
|
|

IDictionary<TKey, TValue> inherits from IEnumerable<KeyValuePair<TKey, TValue>>, but IDictionary for some reason doesn't inherit from IEnumerable<DictionaryEntry>. I wonder why? I hate to write this ugly .OfType<DictionaryEntry>() every time when I need to make a query against an IDictionary.

© Stack Overflow or respective owner

Related posts about .NET

Related posts about generics