|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Config file deletion on Close() with System.ConfigurationHere is my code Code: class ConfigFile { public void AddToConfig(string drive, string path) { System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); config.AppSettings.Settings.Add(drive, path); config.Save(); } } When I call this method, the file is created and filled correctly. The file is valid all along the program but is deleted automatically when the program closes. The only way I found to prevent that is setting the file in read-only before the application closure. Not really clean though... How can I manage to keep the file after closure? Thanks |
|||||||||||||||||||||||