Как изменить значение переменной timeout, которая храниться в файле app.config, так что бы изменился и сам файл? Вот мой код, в процессе работы программы ConfigurationManager выдает измененное значение, но после перезапуска опять стандартное. Visual Studio 2012, c#
Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
config.AppSettings.Settings["timeout"].Value = resFromEnterCountForm.ToString();
config.Save(ConfigurationSaveMode.Modified);
ConfigurationManager.RefreshSection("appSettings");