Currently i have created in my library an app.config file builted like this one:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<appSettings>
<add key ="DATE" value="dd/MM/yyyy"/>
<add key ="TIME" value="HH:mm|HH:mm:ss"/>
<add key ="DURATION" value="ss|mm:ss|hh:mm:ss|hhmmss"/>
<add key ="LAT_LONG" value="dd.ddddd[N,S]dd.ddddd[E,W]|[-]dd.ddddd°,[-]dd.ddddd°|[-]ddmmss.ssss, [-]dddmmss.ssss "/>
</appSettings>
</configuration>
I need my user to modify this settings by adding and/or removing format and even adding new settings to the file. I'm using ConfigurationManager
to do that.
Now i have a doubt that this will actually work when this app will be deployed, cause, if i understand what i read in my previous research, appSettings
cannot be modified at runtime. Do i have to use userSettings
? and in that case can i add them directly in this app.Config
file? how exactly work userSettings
? Can i interact with them with the ConfigurationManager
?
EDIT: ok i understand that i've asked a lot of stuff, so let's make the thing simple. Can i add userSettings node to my app.Config ? If yes, do my application work actually on them?