It is sometimes very handy to be able to upate a value in a config file from within the program.
Here is how:
Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
config.AppSettings.Settings["DailySerialNumber"].Value = this.serialNumber.ToString();
config.Save(ConfigurationSaveMode.Modified);
ConfigurationManager.RefreshSection("appSettings");