Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between ConfigurationManager and ConfigurationSettings

What is the main difference between System.Configuration.ConfigurationManager.AppSettings["key"] and System.Configuration.ConfigurationSettings.AppSettings["key"] ?

like image 385
Karthick Avatar asked Sep 11 '12 10:09

Karthick


People also ask

Can I use ConfigurationManager in .NET core?

ConfigurationManager was added to support ASP.NET Core's new WebApplication model, used for simplifying the ASP.NET Core startup code.

What is ConfigurationManager configuration?

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.

What is the use of ConfigurationManager appSettings?

Gets the AppSettingsSection data for the current application's default configuration.

What is ConfigurationManager C#?

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.


1 Answers

ConfigurationSettings.AppSettings is obsolete. ConfigurationManager.AppSettings is the replacement.

like image 71
Christian.K Avatar answered Sep 28 '22 15:09

Christian.K