System.Collections.Specialized contains StringDictionary http://msdn.microsoft.com/en-us/library/system.collections.specialized.stringdictionary.aspx#Y1626
What's difference with Strong Typed Dictionary in Generics?
A dictionary, also called an associative array, is a collection of unique keys and a collection of values, where each key is associated with one value. Retrieving and adding values is very fast. Dictionaries take more memory because for each value there is also a key.
In C#, Dictionary is a generic collection which is generally used to store key/value pairs. The working of Dictionary is quite similar to the non-generic hashtable. The advantage of Dictionary is, it is generic type. Dictionary is defined under System. Collection.
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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With