Multiple values for a single config key

后端 未结 10 2053
被撕碎了的回忆
被撕碎了的回忆 2020-12-05 01:37

I\'m trying to use ConfigurationManager.AppSettings.GetValues() to retrieve multiple configuration values for a single key, but I\'m always receiving an array o

10条回答
  •  再見小時候
    2020-12-05 02:37

    What you want to do is not possible. You either have to name each key differently, or do something like value="A,B,C" and separate out the different values in code string values = value.split(',').

    It will always pick up the value of the key which was last defined (in your example C).

提交回复
热议问题