Nitin S
Nitin S

Reputation: 7601

Setting app config as a string variable instead of a config file

For my console app I have stored app.config in custom path for now

AppDomain.CurrentDomain.SetData("APP_CONFIG_FILE", "c:\path to config file");
ConfigurationManager.RefreshSection("appSettings");

I wonder how we can load app config XML from a String variable

//pseudo code
String configXML = "<my dynamic xml string>";
AppDomain.CurrentDomain.SetData("APP_CONFIG_FILE", configXML);//<=looking for something like this

Upvotes: 0

Views: 59

Answers (0)

Related Questions