KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I use the following code to remove all elements from a dictionary: internal static void RemoveAllSourceFiles() { foreach (byte key in taggings.Keys) { taggings.Remove(key); } } But unfortunately this isn't working because an InvalidOperationException is thrown. I know this is because the collection is modified while iterating over it, but how can I change that?
Tags (comma-separated)
Save Edits
Cancel