NameValueCollection vs Dictionary [duplicate]

They aren’t semantically identical. The NameValueCollection can have duplicate keys while the Dictionary cannot.

Personally if you don’t have duplicate keys, then I would stick with the Dictionary. It’s more modern, uses IEnumerable<> which makes it easy to mingle with Linq queries. You can even create a Dictionary using the Linq ToDictionary() method.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)