包含設定區段與命名空間宣告。
<configuration>
<configSections>
Attributes
None
父元素
| 父元素 | Description |
|---|---|
<configuration> |
通用語言執行平台和 .NET Framework 應用程式所使用之每個組態檔中的根項目。 |
子專案
| 子專案 | Description |
|---|---|
<section> |
包含一個配置區段宣告。 |
<sectionGroup> |
定義了設定區段的命名空間。 |
備註
如果這個元素存在於設定檔中,它必須是該 <configuration> 元素的第一個子元素。
Example
以下範例說明如何定義設定區段及該區段的設定:
<configuration>
<configSections>
<section name="sampleSection"
type="System.Configuration.SingleTagSectionHandler" />
</configSections>
<sampleSection setting1="Value1"
setting2="value two"
setting3="third value" />
</configuration>
組態檔
此元素可用於應用程式設定檔、機器設定檔(Machine.config)以及非應用程式目錄層級的 Web.config 檔案中。