title: WPF app.config writing
body: <p>I've seen this solution proposed, but doesn't seem to work for me: </p>
  
  <pre><code>Configuration oConfig = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); 
  oConfig.AppSettings.Settings["PreferenceToRemember"].Value = “NewValue”; 
  oConfig.Save(ConfigurationSaveMode.Modified); 
  ConfigurationManager.RefreshSection("appSettings"); 
  </code></pre>
  
  <p>It successfully changes the value in memory, but does not save it back to the config file. </p>
  
  <p>I'm trying to do this in a Wpf app, if that makes any difference. </p>
  
  <p>Or is there a preferred way to save user settings to a file? </p>