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()))
- {
- //Do something here
- }
- }
- 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();
- }

Amit GuptaRank #190 · 12.8K reputationPosted Feb 2, 2017, 10:03 AM EST
Simba White34 reputationPosted Feb 3, 2017, 3:09 AM EST
Amit GuptaRank #190 · 12.8K reputationPosted Feb 3, 2017, 3:16 AM EST
Simba White34 reputationPosted Feb 3, 2017, 3:57 AM EST
Amit GuptaRank #190 · 12.8K reputationPosted Feb 3, 2017, 8:04 AM EST