views:

221

answers:

2

How do I get my program to remember the users settings?

+3  A: 

You can either:

  • write the settings to a file
  • Create setting in VS with Project->Properties->Settings... then by using

    Properties.Settings.Default.SettingName = "something"; // Set setting

    this.Text = Properties.Settings.Default.SettingName; // Use setting

JTA
If you want the settings to persist between application sessions then you will also need to save them: Properties.Settings.Default.Save();
Kildareflare
+1  A: 

Looks like you are looking for UserScopedSettingAttribute

shahkalpesh