I am not able to write "Properties.Settings.Default". It is not coming in the dropdown list. Is there any namespace that we can add?
How to add Properties.Settings.Default in c#
6.1k Views Asked by B.Vyas AtThere are 5 best solutions below

Make sure you are on the same namespace and try to access the properties like this :
namespace.Properties.Settings.Default
or if you are on different namespace don't forget to use
using namespace

An additional hint on top of the above answers:
Go to solution explorer -> Properties folder -> Settings.settings -> Settings.Designer.cs file
and see which namespace is being used there. Ensure that you are using this namespace in your code file as others have suggested

Once you setup your environment in the settings under properties of the app. You want to reference it to the project like this:
using App.Properties.Settings
Then in the code you write you can use as example:
userName.Settings.Default
In this case userName is set within the settings.

Set your Setting in your project go to Project => property => go to setting
Set your element (string,int, ecc...)
Save from program all values
Properties.Settings.Default.User = txtUser.Text; Properties.Settings.Default.Password = txtPass.Text; Properties.Settings.Default.Save();
if you use Windows 10, this is the directory of setting Values: C:\Users\AppData\Local<ProjectName.exe_Url_somedata>\1.0.0.0<filename.config>
Add your project namespace to the Properties namespace. The default namespace defined in the project settings.
For instance if your project default namespace is MyApp.