First of all, is it safe to just add an element to a parallel dictionary using an indexed destination (e.g. myConcurrentDictionary[someKey] = someValue;)?
I'm just confused because it hides IDictionary methods (e.g., Add).
Why is the func function required to add the value of the AddOrUpdate () parameter? Is there a way to set a value for a key regardless of whether the key exists?
I could not compile this on the MSDN page.
user2434174
source
share