System.Collections.Specialized contains String开发者_JAVA百科Dictionary http://msdn.microsoft.com/en-us/library/system.collections.specialized.stringdictionary.aspx#Y1626
What's difference with Strong Typed Dictionary in Generics?
StringDictionary
comes from .Net 1, which predates generics.
Therefore, unlike Dictionary<String, String>
, it doesn't implement any generic interfaces, so it cannot be used with LINQ (unless you Cast()
)
Also, StringDictionary
normalizes all keys to lowercase.
(To make a case-insensitive Dictionary<String, String>
, pass StringComparer.OrdinalIgnoreCase
; this is also more compatible with Turkey)
精彩评论