Sunday, 15 September 2013

wpf - Add User Settings at runtime in a c# application -


I want to add new settings to user.config at runtime for the C # application (WPF). These settings will be linked to the independent module, so I do not know what they will be in advance.

View most examples:

  configurationconf = configurationManager.OpenExeConfiguration (ConfigurationUserLevel.No.);  

But it only allows you to access application settings and you can not save it in any way because it does not mean that it should be modified.

I do something like

  settings. Default.ed ("something", "an object"); Settings. Default. Save ()  

After that this setting will be available the next time, when this specific user will start the application.

It is possible, but this is a lot of code.


No comments:

Post a Comment