In many cases (in a limited user scenario), the user does not have direct access to the application configuration file. To get around this, you need to use user settings.
If you right-click your project and select the tab with the name "Settings", you can make a list of the settings that are stored in the configuration file. If you select "Region" for "User", this parameter is automatically saved in the configuration file, using a type that will automatically save the settings in the users AppData area, where the user always has write access. Settings are also automatically provided as properties created in the properties code file \ Settings.Designer.cs, and are available in your code in Properties.Settings.Default .
Example:
Suppose you add a custom parameter named CustomerName :
When loading the application, you will need to return the value from the saved setting (either by default, as in the application configuration, or if it is stored for this user, the configuration file for the user):
string value = Properties.Settings.Default.CustomerName;
If you want to change the value, just write to it:
Properties.Settings.Default.CustomerName = "John Doe";
If you want to save all the settings, just call Save:
Properties.Settings.Default.Save();
Please note that during development, the user file will have a reset value by default, but this only happens when creating the application. When you simply launch the application, the settings you saved will be read from the user configuration file for the application.
If you still want to create your own settings, you can try it once and see what VisualStudio has automatically created for you to get an idea of ββwhat you need for this.