I am using c# vs2005 compact framework.
I need to update all the values in the dictionary to false.
foreach (string key in parameterDictionary.Keys.ToList())
parameterDictionary[key] = false;
".ToList() is not available" in compactframework. How can i loop and update.
Can any one suggest the way to update all the values in a dictionary.
I don't know if the compact framework is different, but you can't modify the dictionary KeyValuePair directly in a ForEach. You have to copy a list of keys first:
List<string> keys = new List<string>(parameterDictionary.Keys);
foreach (string key in keys)
parameterDictionary[key] = false;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With