windows - Variable in c# resource -
this question has answer here:
- why persisted user settings not loaded? 2 answers
i working on project , need kind of variable save value , after restarting program, value won't refresh.
for example: home page of web browser when change it, save , after restarting application, won't reset first home page address.
i thought can using application properties settings
properties.settings.default.
but didn't work.
if setting application wide, , not per user, can use appconfig
store value. similiar question asked here.
sample code copied amol m kulkarni:
configuration config = configurationmanager.openexeconfiguration(application.executablepath); config.appsettings.settings.add("yourkey", "yourvalue"); config.save(configurationsavemode.minimal);
Comments
Post a Comment