I\'m always confused on which one of these to pick. As I see it I use Dictionary
over List
if I want two data types as a Key
and Val
The biggest reason to use ConcurrentDictionary
over the normal Dictionary
is thread safety. If your application will get multiple threads using the same dictionary at the same time, you need the thread-safe ConcurrentDictionary
, this is particularly true when these threads are writing to or building the dictionary.