Questions tagged [ireadonlydictionary]

2 questions
3
votes
3 answers

Can't convert Dictionary> to IReadOnlyDictionary>

Can anyone explain this problem? Dictionary> x = new Dictionary>(); IReadOnlyDictionary> y = new Dictionary>(); y = x; //…
1
vote
2 answers

Can ReadOnlyDictionary be used when only the values are changing?

I know ReadOnlyDictionary is "thread-safe" when accessing from multiple threads as long as the collection isn't changing. But what if the collection isn't changing (no keys are ever added/removed) and values are thread-safe by themselves, meaning,…