I’m trying to use ConfigurationManager.AppSettings.GetValues() to retrieve multiple configuration values for a single key, but I’m always receiving an array of only the last value. My appsettings.config looks like
<add key="mykey" value="A"/>
<add key="mykey" value="B"/>
<add key="mykey" value="C"/>
and I’m trying to access with
ConfigurationManager.AppSettings.GetValues("mykey");
but I’m only getting { "C" }.
Any ideas on how to solve this?
Try
And