I am trying to implement a caching mechanism for enumerating collections safely, and I am checking if all modifications of the built-in collections are triggering an I
To clarify when the change was made available and via which methods...
Microsoft's docs on the Dictionary's .Remove and .Clear have been updated:
.NET Core 3.0+ only: this mutating method may be safely called without invalidating active enumerators on the Dictionary
instance. This does not imply thread safety.
.NET Core 3.0 came with C# 8.0. Since then, we have been able to modify a Dictionaryforeach
) via .Remove and .Clear only.