c# - :Set project application settings to defaults -


i'm trying use application setting in c# project. however, properties.settings.default.reset() sets properties system defaults (a string set null , not value set base).

is there way set default values properties can call method set them default?

edit : question concerns setting default individual properties, not of them together.

you can specify defaults user settings visual studio, in properties window of project, in settings tab. enter in value column.

the values specify saved in app.config, in usersettings section (you can edit them there, too), , used when calling properties.settings.default.reset().

to understand happens: when call save(), current values of user settings saved in file under user profile folder in windows, , when call reset() values app.config file application folder used overwrite them.

if want reset individual setting (somesetting) default, do:

settings.default.somesetting = settings.default.properties["somesetting"].defaultvalue; settings.default.save(); 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -