posts - 18, comments - 23, trackbacks - 1

My Links

News

This blog has moved to http://shailen.sukul.org

Article Categories

Archives

Post Categories

TO Get the App.Config file from another Assembly

public

{

 

 

fName +=

 

xDoc.Load(fName);

 

 

 

}

static string GetAppConfig(string key)string fName = Assembly.GetExecutingAssembly().Location.Substring(0,Assembly.GetExecutingAssembly().Location.LastIndexOf("\\"));"\\MyApp.exe.config";XmlDocument xDoc = new XmlDocument();XmlNode xNode = xDoc.SelectSingleNode("/configuration/appSettings");XmlNode keyNode = xNode.SelectSingleNode(string.Format("//add[@key='{0}']", key));return keyNode.Attributes["value"].Value;
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Print | posted on Tuesday, May 08, 2007 1:26 AM |

Feedback

No comments posted yet.
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 
 

Powered by: