I want to implement application settings to have them update settings that wont be set in a file i manage. I have the following so far:
In settings I have a variable named valuesforcomparison of type nameValueCollection and the scope is user. Now when I do the following the variable isnt updated the next time the user runs the program.
开发者_如何学C public void UpdatePropertySettings(NameValueCollection settings)
{
Properties.Settings.Default.valuesforcomparison = new NameValueCollection();
for (int i = 0; i < settings.Count; i++)
{
Properties.Settings.Default.valuesforcomparison.Add(settings.GetKey(i), settings.GetValues(i)[0]);
}
Properties.Settings.Default.Save();
Properties.Settings.Default.Upgrade();
defVals = settings;
}
NameValueCollection isnt supported.
精彩评论