KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
So I have a Dictionary<string, bool> and all I want to do is iterate over it and set all values to false in the dictionary. What is the easiest way to do that? I tried this: foreach (string key in parameterDictionary.Keys) parameterDictionary[key] = false; However I get the error: "Collection was modified; enumeration operation may not execute." Is there a better way to do this?
Tags (comma-separated)
Save Edits
Cancel