That is pretty much alike to modifying web.config, see previous post here.
Code snippet as follow which open up the app.config, modify values, save it back.
Configuration l_appConfig = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
AppSettingsSection appSettings = (AppSettingsSection)l_appConfig.GetSection("appSettings");
//let say you want to modify the setting name DatabaseHost
appSettings.Settings["DatabaseHost"].Value = "blahblahblah";
After you run the program and execute this code. You will find that the app.config won’t change.
Because the .config which get modified it in \bin\Debug or \bin\Release depends on what mode you are running.