.net dynamically refresh app.config

前端 未结 10 788
闹比i
闹比i 2020-12-02 23:28

How do I dynamically reload the app.config in a .net Windows application? I need to turn logging on and off dynamically and not just based upon the value at application sta

10条回答
  •  鱼传尺愫
    2020-12-02 23:48

    I don't think there's any way to do this, unless you write your own config file reader using XML. Why not just turn logging on or off at the start of your app based on the config file setting, and then just turn it on or off dynamically while the program is running?

提交回复
热议问题