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
Comments are closed.
Navigation


Archive
<March 2010>
SunMonTueWedThuFriSat
28123456
78910111213
14151617181920
21222324252627
28293031123
45678910


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