title: Change C# app.config appSettings at runtime
body: <p>My app.config has appSettings like that:</p>
  
  <pre><code>&lt;appSettings&gt;
      &lt;add key="PdfSavePath" value="D:/Test" /&gt;
  &lt;/appSettings&gt;
  </code></pre>
  
  <p>Now i would like to change the PdfSavePath at runtime in my WPF application. When the user selects the path, it should also be updated in the app.config. I tried to do it like that (SavePath contains the new path):</p>
  
  <pre><code>ConfigurationManager.AppSettings["PdfSavePath"] = SavePath;
  </code></pre>
  
  <p>However, this didn't work. Does anybody have a solution for that?</p>
  
  <p>Thanks.</p>