Can ConfigurationManager retain XML comments on Save()?

后端 未结 3 1529
既然无缘
既然无缘 2020-12-14 16:21

I\'ve written a small utility that allows me to change a simple AppSetting for another application\'s App.config file, and then save the changes:

 //save a b         


        
3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-14 16:51

    If comments are critical, it might just be that your only option is to read & save the file manually (via XmlDocument or the new Linq-related API). If however those comments are not critical, I would either let them go or maybe consider embedding them as (albeit redundant) data elements.

提交回复
热议问题