Friday, March 13, 2009

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");
Friday, March 13, 2009 10:32:52 AM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
.Net | C# | Development
Navigation


Archive
<March 2009>
SunMonTueWedThuFriSat
22232425262728
1234567
891011121314
15161718192021
22232425262728
2930311234


SilverCode Solutions Ltd
4 Maple Close
Brentwood
Essex
UK
CM13 2EA
Phone: 0845 0557260
© Copyright 2010
SilverCode Solutions Ltd
Sign In

Statistics
Total Posts: 16
This Year: 4
This Month: 1
This Week: 1
Comments: 13