class - C# what is alternative for settings -


i save settings persist on multiple runs, same thing settings in c# does, when using settings.default.save().

is there alternative store variables in class or similar?

you have lot of options here.

  • save settings windows registry.
  • save settings text file.
  • save settings in database.

here's how go saving application settings:

  • create settings class settings properties want save.
  • create functions loadsettings() , savesettings().
  • savesettings responsible creating instance of settings, serialize , save it. use newtonsoft.json serialize json.
  • loadsettings reads file saved data, deserialize it, , populate ui it.

if implement similar, can save settings file custom file extension , associate extension application.

this way, in main method, can check settings file load.

i use approach when have allow more 1 instance of application because <namespace>.properties.settings doesn't cut in case.


Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -