C# 自定义配置节点简例

参考:

示例配置文件:

 

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="mySection" type="SimpleCustomConfigSection.MySection, SimpleCustomConfigSection" />
  </configSections>
  <mySection>
    <common value="value of common" />
    <inner>value of inner</inner>
    <collection>
      <add key="key1" value="value1" />
      <add key="key2" value="value2" />
      <remove key="key1" />
    </collection>
  </mySection>
</configuration>

 

代码见附件

你可能感兴趣的:(C#,configuration)