writing data in config file
-
Hello, I am using config file in C# form application. I have provided UI which takes the data form user and on request saves the data to the Properties.Settings.Default.MyVal The problem is that internally(while debugging the application i saw) it knows that the particular data has been modified and reads the modified data but these changes are not reflected in app.config file. How should i save the data to the Properties.Settings.Default.MyVal file so that it reflects to the app.config file exacly. Thanks.
-
Hello, I am using config file in C# form application. I have provided UI which takes the data form user and on request saves the data to the Properties.Settings.Default.MyVal The problem is that internally(while debugging the application i saw) it knows that the particular data has been modified and reads the modified data but these changes are not reflected in app.config file. How should i save the data to the Properties.Settings.Default.MyVal file so that it reflects to the app.config file exacly. Thanks.
gajesh wrote:
The problem is that internally(while debugging the application i saw) it knows that the particular data has been modified and reads the modified data but these changes are not reflected in app.config file.
I had a couple of thoughts on this, though I'm not an expert: When you are running in debug mode, I thought it wrote changes to a temporary config file in the Debug directory rather than in the project directory. You might check that. Also, how are you writing out application-scoped settings? I know that user-scoped ones can be assigned, but I thought application ones were read-only. I know you can read the XML yourself and do it, but I *thought* only user settings were writable. Good Luck!
It isn't enough to do well in life. One must do good when and where one can. Otherwise, what's the point?