vs 2005中类库如何访问 app.config
来源:互联网 发布:html2canvas.js demo 编辑:程序博客网 时间:2024/06/03 05:45
#region 取得Lib的App.config的连接字符串
try
{
string fileFullPath = Assembly.GetExecutingAssembly().CodeBase.Replace("[url=file:///]file:///", string.Empty);
string filePath = fileFullPath.Substring(0, fileFullPath.LastIndexOf("/")) + "/App.config";
if (document == null)
{
document = new XmlDocument();
}
document.Load(filePath);
connectionString = document.SelectSingleNode(@"/configuration/appSettings/add[@key='connString']").Attributes["value"].Value;
}
catch (XmlException ex)
{
throw new XmlException(ex.Message);
}
#endregion
- vs 2005中类库如何访问 app.config
- VS2005 如何读写 app.config
- 如何立即保存app.config
- VS.Net2.0中WinForm加密App.config配置文件
- VS.Net2.0中WinForm加密App.config配置文件
- 我是如何动态编辑App.config的!
- 我是如何动态编辑App.config的!
- 我是如何动态编辑App.config的
- 如何配置及读取App.config文件
- 【C#】【WPF】如何读写app.config文件
- VS CONFIG
- VC++2005 WINFORM app.config
- [From Network].NET访问配置文件app.config的功能详解
- .NET访问配置文件app.config的功能详解
- app.config
- app.config
- app.config
- app.config
- DateTime比较 动态添加控件事件
- about "apt"
- 一个老板的三句话
- mysql总结
- 尚不成熟的单个摄像头触屏方案
- vs 2005中类库如何访问 app.config
- 异步串口的发送与接收
- zoj 1060 || poj 1094 Sorting It All Out(拓扑排序)
- Mantis Installation Guide (for 1.1.8)
- URL上中文传参乱码解决方案
- asp.net 中常用的四种缓存
- Map的iterator()遍历输出
- VBS中Sendkey键盘对应的码表
- asp.net 常用页面间传值方式