I'm trying to save two user values (SliderWidth and SliderHeight). I want to do this with the Visual Studio option settings.
When I debug this with this code:
public void Test(int value)
{
Properties.Settings settings = Properties.Settings.Default;
settings.SliderWidth = value;
settings.Save();
}
The values do not change (after the program ended).
What's wrong?
It definitely works. Try this:
public void Test(int value)
{
Properties.Settings settings = Properties.Settings.Default;
MessageBox.Show("Last SliderWidth = " + settings.SliderWidth.ToString());
settings.SliderWidth = value;
settings.Save();
}
But the saved value won't be reflected in the Designer window you are showing in your screen shot. Those are the initial default values.