[导入]包含配置节和命名空间声明
包含配置节和命名空间声明。
<configuration>
<configSections>
<configSections>
</configSections>
子元素
| 元素 | 说明 |
|---|---|
| <section> | 包含配置节声明。 |
| <sectionGroup> | 为配置节定义命名空间。 |
| <configSections> 的 <remove> 元素 | 移除预定义的节或节组。 |
| <configSections> 的 <clear> 元素 | 清除所有以前定义的节和节组。 |
备注
如果此元素在配置文件中,则它一定是 <configuration> 元素的第一个子元素。
示例
下面的示例说明如何定义配置节以及如何定义该节的设置。
<configuration>
<configSections>
<section name="sampleSection"
type="System.Configuration.SingleTagSectionHandler" />
</configSections>
<sampleSection setting1="Value1" setting2="value two"
setting3="third value" />
</configuration>
配置文件
此元素可用于应用程序目录级以外的应用程序配置文件、计算机配置文件 (Machine.config) 和 Web.config 文件中
文章来源:http://www.codeguru.cn/ShowThread.aspx?PostID=727
浙公网安备 33010602011771号