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

minify - Minimizing css files -

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -