社区
C#
帖子详情
ConfigurationManager 能指定配置文件吗?
wangxiao2008
2009-06-10 02:24:26
ConfigurationManager 能指定配置文件吗?
...全文
271
6
打赏
收藏
ConfigurationManager 能指定配置文件吗?
ConfigurationManager 能指定配置文件吗?
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
6 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
jinlingoo1
2009-06-10
打赏
举报
回复
System.Configuration.ConfigurationManager.ConnectionStrings["STM"].ConnectionString;
<connectionStrings>
<add name="STM" connectionString="server=.;database=123;user id=sa;password=sa"/>
</connectionStrings>
connectionStrings可以写很多,只要根据name选择就行.
wangxiao2008
2009-06-10
打赏
举报
回复
不能指定啊?有几个配置文件,不想把他们合并到一起。
那就不能使用ConfigurationManager了呗
zenowolf
2009-06-10
打赏
举报
回复
up~
wuchuang_top
2009-06-10
打赏
举报
回复
配置文件只有一个,web.config
Profiteerchen
2009-06-10
打赏
举报
回复
不可以
lovvver
2009-06-10
打赏
举报
回复
不可以,你有几个配置文件?应用程序或者服务职能有一个配置文件吧。
C#使用
Configuration
Manager
类操作
配置文件
C#使用
Configuration
Manager
类操作
配置文件
.net1.1中如果需要灵活的操作和读写
配置文件
并不是十分方便,一般都会在项目中封装一个配置 文件管理类来进行读写操作。而在.net2.0中使用
configuration
manager
...
c# 使用
Configuration
Manager
打开任意的config
配置文件
.net应用程序,不管是网页还是exe程序,本身都自带了一个
配置文件
,比如web.config和App.Config,但是如果我们要配置的东西很多,就需要放到不同的文件下,这个时候就要新增一些
配置文件
,新增之后怎么打开呢,这里...
使用
Configuration
Manager
类 读写
配置文件
使用
Configuration
Manager
类读写
配置文件
app.config,以下为代码: App.config 中的代码如下: Program.cs 类的代码如下 using System.Collections.Generic; using System.Linq; using ...
Configuration
Manager
读取app.config、web.config
配置文件
Configuration
Manager
读取app.config、web.config
配置文件
Configuration
Manager
读取AppSettings读取ConnectionString读取自定义节点
Configuration
Manager
Configuration
Manager
常用来读取程序的
配置文件
,比如...
Configuration
Manager
.OpenExe
Configuration
读取
配置文件
Configuration
Manager
.OpenExe
Configuration
可以读取
配置文件
, 如果读取其他程序的
配置文件
。可以使用如下方法:
Configuration
con1 =
Configuration
Manager
.OpenExe
Configuration
(@"MainApp.exe"); if...
C#
110,534
社区成员
642,575
社区内容
发帖
与我相关
我的任务
C#
.NET技术 C#
复制链接
扫一扫
分享
社区描述
.NET技术 C#
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
让您成为最强悍的C#开发者
试试用AI创作助手写篇文章吧
+ 用AI写文章