In my app.config file I have a custom section under configuration
with multiple entries that share the same key.
<setion1>
<add key="key1" value="value1"/>
<add key="key2" value="value2"/>
<add key="key1" value="value3"/>
</section1>
I'm using the following code to get a NameValueCollection
object from reading the entries.
var list = (NameValueCollection)ConfigurationManager.GetSection("section1");
I expected this code to return each entry under the section however it seems to only bring back unique values with respect to the key. How can I collect all the children of <section1>
irrespective of the keys?