ConfigurationManager.AppSettings[“SettingName”] vs Properties.Settings.Default.SettingName when should I use each?

后端 未结 4 1784
悲&欢浪女
悲&欢浪女 2021-02-04 01:11

What should dictate when I should use the configurationManager.AppSettings or the strongly typed settings that visual studio generates? The strongly typed ones seem much more a

4条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-04 01:47

    Use Properties.Settings.Default.SettingName. But ConfigurationManager.AppSettings[”SettingName”] should be used only when first is impossible to use.

提交回复
热议问题