Top "Concurrentdictionary" questions

ConcurrentDictionary is a .Net thread-safe collection of key-value pairs that can be accessed by multiple threads at the same time.

.NET - Dictionary locking vs. ConcurrentDictionary

I couldn't find enough information on ConcurrentDictionary types, so I thought I'd ask about it here. Currently, I use a …

.net concurrency dictionary concurrentdictionary
Can ConcurrentDictionary.TryAdd fail?

This is more of an academic question... but can ConcurrentDictionary.TryAdd fail? And if so in what cases and why?

c# concurrentdictionary
How can I convert a ConcurrentDictionary to a Dictionary?

I have a ConcurrentDictionary object that I would like to set to a Dictionary object. Casting between them is not …

c# .net dictionary concurrentdictionary
When should I use ConcurrentDictionary and Dictionary?

I'm always confused on which one of these to pick. As I see it I use Dictionary over List if …

c# dictionary concurrentdictionary
ConcurrentDictionary<> performance at a single thread misunderstanding?

Related brief info: AFAIK , The concurrent stack, queue, and bag classes are implemented internally with linked lists. And I know …

c# .net-4.0 task-parallel-library concurrentdictionary
How do you convert a dictionary to a ConcurrentDictionary?

I have seen how to convert a ConcurrentDictionary to a Dictionary, but I have a dictionary and would like to …

c# asp.net .net dictionary concurrentdictionary
Getting a value from a ConcurrentDictionary

If I have this ConcurrentDictionary: public class User { public string Context { get; set; } public bool Owner { get; set; } } protected static …

c# concurrentdictionary
Tuple vs string as a Dictionary key in C#

I have a cache that I implement using a ConcurrentDictionary, The data that I need to keep depends on 5 parameters. …

c# .net caching equality concurrentdictionary
How do you set a value in a ConcurrentDictionary regardless of whether it contains the Key

First of all, is it safe to simply add an item to a concurrent dictionary using the indexed assignment (e.…

c# concurrentdictionary
Caching asynchronous operations

I am looking for an elegant way of caching the results of my asynchronous operations. I first had a synchronous …

c# .net multithreading async-await concurrentdictionary