How can I retrieve list of custom configuration sections in the .config file using C#? [duplicate]
问题 This question already has answers here : Custom Configuration for app.config - collections of sections? (2 answers) Closed 6 years ago . When I try to retrieve the list of sections in the .config file using Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); the config.Sections collection contains a bunch of system section but none of the sections I have file defined in the configSections tag. 回答1: Here is a blog article that should get you what you