What is the difference between file settings.settings in the root of my project(with app.config) and the Seetings.settings in the Properties folder.
I have observed that both files merge after build in the application config file.
Where should I use?
Thanks.
The settings from the .settings file will be added to the app.config
<applicationSettings>element but not the opposite.can be used to store keys and values easily. just put
<add>element there, write key and value and you’re good to go (and you can read them withConfigurationManager.AppSettings["bla"])BUT, when you put values there you don’t have type safety and it can becomes really really messy if you always add configurations elements to there.
When you use application settings files (that behind the scenes generates section in your app.config with sub-section for each settings file) you can enjoy the benefits of types safety and it’s more organized in your code.
In addition, it’s easier to edit them in runtime (you can have Application scope and User scope).
Hope this helps.