What's the difference in using Dictionary<string, string>
and NameValueCollection
?
I searched, but only found in English in the SOpt same, I used the translator, but the translation was strange and I did not understand.
What's the difference in using Dictionary<string, string>
and NameValueCollection
?
I searched, but only found in English in the SOpt same, I used the translator, but the translation was strange and I did not understand.
The only thing you need to know is: do not use NameValueCollection
. The specialized collections are practically obsolete. They were needed for C # 1.0, with the advent of generic collections, use them instead. The specialized ones do not receive more affection, they are probably outdated. It goes from Dictionary
.
There is a difference, since the second is a multi map allowing you to have multiple values with the same key. But if you need this, and generally do not need to, then you want to use Lookup
.