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

后端 未结 4 1723
悲&欢浪女
悲&欢浪女 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:59

    I'd advise that the loosely typed settings are older and really should only be used for backwards compatibility.

    The strongly-typed settings are more robust as they are... strongly typed.

提交回复
热议问题