Вопрос в коде:
Код: Выделить всё
ConcurrentDictionary cd = new ConcurrentDictionary();
// This might fail if another thread is adding with key value of 1.
cd.TryAdd(1, "one");
// Will this ever fail if no other thread ever removes with the key value of 1?
cd.TryRemove(1);
Я думаю, что он вернет false только в том случае, если он не содержит значения для данного ключа, но хочет чтобы быть абсолютно уверенным.
Подробнее здесь: https://stackoverflow.com/questions/351 ... turn-false
Мобильная версия