title: How to iterate through Dictionary and change values?
body: <pre><code>Dictionary&lt;string,double&gt; myDict = new Dictionary();
  //...
  foreach (KeyValuePair&lt;string,double&gt; kvp in myDict)
   {
       kvp.Value = Math.Round(kvp.Value, 3);
  }</code></pre>
  
  <p>I get an error:
  "Property or indexer 'System.Collections.Generic.KeyValuePair.Value' cannot be assigned to -- it is read only."<br>
  How can I iterate through <code>myDict</code> and change values?</p>