10

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?

apaderno
  • 28,547
  • 16
  • 75
  • 90
user310291
  • 36,946
  • 82
  • 271
  • 487

1 Answers1

19

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)

SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964