有谁知道我如何使用标准 API 获取 configSource 值?
<appSettings configSource="AppSettings.config" />
Run Code Online (Sandbox Code Playgroud)
或者我是否需要解析 XML 中的 web.config 来获取值?
尝试
ConfigurationManager.AppSettings["configSource"]
Run Code Online (Sandbox Code Playgroud)
您需要using System.Configuration;在代码中添加 : 命名空间
| 归档时间: |
|
| 查看次数: |
3308 次 |
| 最近记录: |