Я хочу изменить значение в разделе appSetting в app.config. Поэтому я написал,
Console.WriteLine(ConfigurationManager.AppSettings["name"]);
Console.Read();
Configuration config=ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
config.AppSettings.Settings["name"].Value = "raja";
config.Save(ConfigurationSaveMode.Modified);
ConfigurationManager.RefreshSection("appSettings");
Console.WriteLine(ConfigurationManager.AppSettings["name"]);
Console.Read();
после выполнения вышеуказанного кода, я проверил app.config, было ли изменено значение элемента "name". но никаких изменений.
Что случилось с моим кодом? или есть ли другой способ сделать это?