我正在类中访问App.config中的密钥。如果我不考虑大小写地给出密钥,我就能访问它的值。
我已经检查过了,没有使用ToLower()方法。
//The below is the key in App.config
<add key="Timezone_Minutes" value="+100"/>
//Accessing this key in class
private static readonly string timezoneMinutes = ConfigurationSettings.AppSettings["TIMEZONE_MINUTES"];
我在timezoneMinutes中得到了值+100。在App.config中给定的键是Timezone_Minutes,但在类中访问时是TIMEZONE_MINUTES。但我仍然得到了这个值。它是否不区分大小写?我尝试通过谷歌搜索,但没有得到合适的答案。