Why my changes of AppSettings in App.config is not taken into account in run-time? (Console Application)

前端 未结 2 810
星月不相逢
星月不相逢 2020-12-14 10:38

I have a console application which has its own App.config.

I need to change some values in section time to time.

My problem is, when I execute the exe withi

2条回答
  •  北荒
    北荒 (楼主)
    2020-12-14 11:38

      Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
    // change ConnectionString in App.Config for Entity FrameWork Object....
     //..... 
    config.Save();
    

    are you save config file?

提交回复
热议问题