I have a Winforms / C # application and I transfer from the xml configuration file to the application settings. I would like to know if it is possible to access the dynamic settings of the application (Properties.Settings.Default).
I have 4 configurations for my application with the corresponding parameters, which I logically named name1, name2, name3, name4, server1, server2, etc. Instead of giving them a value like
Properties.Settings.Default.name1 = textbox.txt;
I would like to do something similar with respect to the configuration to which they belong:
class ApplicationSettings
{
int no;
ApplicationSettings(int no)
{
this.no = no;
}
private void save()
{
Properties.Settings.Default.Properties["name"+no] = "value";
}
}
This technique only works for SettingsProperties, as shown here . Do you know if there is a way to do this?
source
share