C# อ่านเขียน app.config ของโปรแกรม
สิงหาคม 25th, 2009
อ่าน
string value = ConfigurationManager.AppSettings["appvalue"];
เขียน
System.Configuration.Configuration config =ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
config.AppSettings.Settings["appvalue"].Value = “3″;
config.Save(ConfigurationSaveMode.Modified);
ConfigurationManager.RefreshSection(“appSettings”);
ความเห็นล่าสุด