I created settings in my winforms app like this: link
You can see I have timer interval value there. With the goal that inside timer here:
{
// Inside timer tick handler
....
finally
{
timer1.Stop();
int tinterval = Properties.Settings.Default.TimerInterval;
HelperMethods.AppendToLogFile(tinterval.ToString(), LogType.Information);
timer1.Interval = tinterval;
timer1.Start();
}
}
I want to change interval value of timer on runtime.
But when I launch the application even if I change the interval inside the app.config file (opened from windows explorer), still old value is being read inside the timer above. What am I doing wrong?
EDIT: Actually this doesn't even work, if I close my application, and start it again (i.e. restart my application). It still reads old values from app.config
(not the ones I entered after application was shutdown and before application was opened). What am I getting wrong?
PS. The culprit maybe here, please see - It always reads the old value 1500, instead of 2000. You can see how VS is saying (after I closed and reopened project) that settings file still has old value, what is going on here?