Can ICollection<T>.Count property getter be considered atomic (and, therefore, threadsafe)?
Thank you.
Atomic would only make sense for implementation and not interface. You could have two implementations: one non-thread-safe implementation one thread safe.
List<T> is not thread safe since it does not use InterLocked.
Interlocked make the List<T> implementation of Count thread-safe? The Count property just returns an int field, which is an atomic read. Of course, there's always the possibility that the count is already stale by the time it's returned to the caller, but that's just as likely if Interlocked was used.