Answer the question
In order to leave comments, you need to log in
Saving settings via settings
Hello.
I use the program to save settings (for example, to connect to the database) through Property.Settings, but after recompilation they fail.
Settings.Default.server = txt_server.Text;
Settings.Default.user = txt_login.Text;
Settings.Default.password = txt_password.Text;
Settings.Default.bdname = txt_bdname.Text;
Settings.Default.Save();
Answer the question
In order to leave comments, you need to log in
Thanks for the clarification, then I know what's the matter :-)
Just add one more parameter to the settings, for example CallUpdate with the default value "true", and when loading the settings, use the following code:
if (Settings.Default.CallUpgrade)
{
Settings.Default.Upgrade();
Settings.Default.CallUpgrade = false;
}
// Далее использование настроек.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question