Associative Array / Hash Table?
I need an array or list or hash table that will allow me to have keys that are not unique, for example:
"table_name1", "error in field name"
"table_name2", "error in field address"
"table_name2", "error in field zipcode"
"table_name2", "error in field other"
etc.. there will be multiple keys but they could have the same names. Another issue is I could be storing up to 1,000,000+ elements so performance is an issue. Any ideas what data structure I can use?
Re: Associative Array / Hash Table?
Hi,
Are the values unique? Perhaps you can switch the mapping. Any collection that doesn't support unique keys is unlikely to give a performance as good as the hash table or generic dictionary.
Re: Associative Array / Hash Table?
The values will be unique yes, I never thought about switching the mapping, that's a good idea.
Re: Associative Array / Hash Table?
NameValueCollection<T> I think handles multiple KVP's with the same Key, but different values.