c# - Set value in app.config file to null -


i'm updating app.config value during runtime, want update value null value far empty string. still want able set empty string purpose, how value return null?

try remove key, if remove value null.

var val = system.configuration.configurationmanager.appsettings["key"] 

you can remove key in code

 configuration config = configurationmanager.openexeconfiguration(configurationuserlevel.none);  config.appsettings.settings.remove("key"); 

Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -