Make User Settings & Edit Them C#

By sbondo1234 on 18 July, 2019

Create Settings

Right-click on your project and head down to Properties and then on the left-click on the settings button.

Enter the Name, type, scope & value of each setting you want to add.

Note: The Application Scope is not editable during runtime and will always stay the default value you set right now.

Setting Values To Settings Value

If you want to set, for example, the value of a variable to the same as a settings value, you can do the following:

string Name = Properties.Settings.Default.SettingName

Changing Settings Value

You can change settings values in runtime (If you set the scope to user). This can be achieved easily, by doing something simmilar to this:

Properties.Settings.Default.SettingName = "Some Value";
Properties.Settings.Default.Save(); // Save all edited settings

If you don’t include the last line in the example above, then the values edited won’t be saved!