Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between an "Application Configuration File" & "Settings File" in C#?

What is the purpose of having two files that appear to do the same/similar thing? Is one deprecated and should I be using the other? Please, break it down for me.

Thanks!

Application Configuration ImageSettings File Image

like image 723
Brandon Boone Avatar asked Dec 22 '22 00:12

Brandon Boone


2 Answers

Check Settings file -v- app.config.

like image 73
Incognito Avatar answered Feb 15 '23 23:02

Incognito


Implementation.

An application can provide an interface for the user to edit/modify setting that can be persisted. There is no API to write to app.config and nothing to re-load it should it be changed at run-time. Thus, Settings were created. They provide one place to hold application and user settings. User settings default values are stored in app.config that the user can edit before the application is run; but should the application provide an interface to edit/modify certain settings they can be persisted back to disk to a user.settings file local to the user allowing users to have independent and secure setting values

like image 25
Eton B. Avatar answered Feb 15 '23 23:02

Eton B.