let\'s say I have the following code:
ConcurrentDictionary myDict= new ConcurrentDictionary();
Normally
As already mentioned, ConcurrentDictionary.GetEnumerator() does not represent a moment-in-time snapshot of the dictionary. However, ConcurrentDictionary.Values does produce a moment-in-time snapshot.
Therefore the following are not equivalent:
myDict.Any(x => !x.Value.HasPaid)
myDict.Values.Any(x => !x.HasPaid)