前几天写过一篇《客户端调用DLL类库项目时,config文件中自定义Section的顺序》,现在把工作中的一个实现部分简化成一个小例子。 App.config <configSections> <sectionGroup name="multiCountryLanguage"> <section name="USA" type="CfgFactory.NameValuePair, CfgFactory"/> <section name="USA_default" type="CfgFactory.NameValuePair, CfgFactory"/> <section name="CHINA" type="CfgFactory.NameValuePair, CfgFactory"/> <section name="CHINA_default" type="CfgFactory.NameValuePair, CfgFactory"/> </sectionGroup> </configSections> <multiCountryLanguage> <USA> <add name="East" value="For East" /> <add name="South" value="