What is the main difference between System.Configuration.ConfigurationManager.AppSettings["key"] and System.Configuration.ConfigurationSettings.AppSettings["key"] ?
ConfigurationManager was added to support ASP.NET Core's new WebApplication model, used for simplifying the ASP.NET Core startup code.
The ConfigurationManager class enables you to access machine, application, and user configuration information. This class replaces the ConfigurationSettings class, which is deprecated. For web applications, use the WebConfigurationManager class.
Gets the AppSettingsSection data for the current application's default configuration.
ConfigurationManager is the class which helps to read data from configurations. Provides access to configuration files for client applications. Namespace: System.Configuration. To use the ConfigurationManager class, your project must reference the System.
ConfigurationSettings.AppSettings is obsolete. ConfigurationManager.AppSettings is the replacement.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With