原因应该是configsections需要放在首节,
我测试可用的:
<?xml version="1.0" encoding="utf-8" ?><configuration>
<!-- 扩展节 --> <configSections> <sectionGroup name="TestGroup"> <section name="Test" type="System.Configuration.NameValueSectionHandler" /> </sectionGroup> </configSections>
<!-- 连接字符串 --> <connectionStrings> <clear /> </connectionStrings> <!-- 程序配置 --> <appSettings> <clear /> </appSettings>
<TestGroup> <Test> <add key="text1" value="text100" /> <add key="text2" value="text200" /> </Test> </TestGroup>
</configuration>
转载于:https://www.cnblogs.com/ijunxiong/articles/5590417.html
相关资源:数据结构—成绩单生成器