How to set app settings without save in c# [duplicate]
问题 This question already has answers here : How to Update (Add/Modify/Delete) keys in AppSettings section of web.config at runtime (4 answers) Closed 3 years ago . We want to develop an application that gets the configuration items from a json file and stores the key&values at ConfigurationManager.AppSettings. But AppSettings dictionary is readonly. We don't want to update or save the app.config file. This operation have to be at memory. Is there any way to do this? 回答1: The answer was so easy.