What is an alternative to Dictionaries in C# that allows for duplicate keys?

In your case, the same key is related to multiple values, so standard dictionary is not suitable, as is. You can declare it like Dictionary<Key, List<Values>>.

But, also, you can use:

Lookup class, which is

Represents a collection of keys each mapped to one or more values.

You need framework 3.5 and more, for this.

Leave a Comment

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