I have a big project with many sub projects. For a specific sub project, I want to create user settings at run time.
I have initialized the settings file with one dummy Setting.
Why the settings are not getting saved into the Settings file ?
Some articles suggest to Set User-Scope ? I have no idea how to do that.
Thank you
- try
- {
- if (!string.IsNullOrEmpty(Properties.Settings.Default["mySetting"].ToString()))
- {
-
- }
- }
- catch (Exception)
- {
- SettingsProperty AProperty = new SettingsProperty("mySetting");
-
- AProperty.PropertyType = typeof(bool);
- AProperty.IsReadOnly = false;
- AProperty.DefaultValue = false;
- Properties.Settings.Default.Properties.Add(AProperty);
- Properties.Settings.Default.Save();
- Properties.Settings.Default.Reload();
- }