Home > Mobile >  How to save to user settings?
How to save to user settings?

Time:09-26

I added some properties to the resources :

resources

but i can't get access to the first one the Interval :

[DefaultValue(200)]
public int TimerInterval
{
    get => m_Interval;
    set
    {
        value = Math.Max(55, Math.Min(value, 500));
        if (m_Interval != value)
        {
            m_Interval = value;
            dotsTimer.Interval = m_Interval;

            Properties.Settings.Default.in
        }
    }
}

there is no Interval after the dot when i typed Default. there is no Interval.

and how do i set in the resources the interval to be type int and not string ?

CodePudding user response:

You can use User or Application settings instead of resources, that way you can choose the type. You can find it under project > project properties

enter image description here

Click Create or open application settings

  • Related