I'm trying to change in runtime one key of my applications settings file, but it does not work.
I do on that way:
ConfigurationSettings.AppSettings["XPTO"] = "HELLO";
It seems that it only changes in memory, not on the file.
Does anyone knows how to do this?
Thanks.
Take a look at my overview of .NET settings files...In short, I think you want a user-scoped setting. It will behave more like you expect.
Edit: If you are using the settings designer in Visual Studio, then simply change the "Scope" to "User". If not, you should be able to do the equivalent programmatically.