3
Answers

create Properties.Setting at runtime

Amin Memar

Amin Memar

4y
4.2k
1
hi
i want to create dynamically new Property.Settings at runtime i tried this code but not worked t
also no changes in setting (i am using wpf).can anyone help pls?
 
 
  1. var property = new System.Configuration.SettingsProperty("propertyName");  
  2.             property.PropertyType = typeof(bool);  
  3.             property.DefaultValue = true;  
  4.             Properties.Settings.Default.Properties.Add(property);  
  5.             Properties.Settings.Default.Save();   
Answers (3)