Skip to content
Sharp

Collections · interview question

Several threads add and read cached values by key at the same time. Which collection fits best?

Multiple choiceEasy
Choose one answer
Answer and explanation

Correct answer

A. ConcurrentDictionary<TKey,TValue>

Why

ConcurrentDictionary supports lock-free reads and fine-grained locking for writes, with atomic helpers like GetOrAdd and AddOrUpdate.

Test yourself on Collections

A free test with instant, explained results. No account needed.

Start free test