I just start working with .NET Framework 4.5 of C#. Am using Windows Form Application. I have do the needed imports such as :
using System.Configuration;
But actually the ConfigurationManager class seems that it is not exits. I have tried to use ConfigurationSettings instead , but Visual Stdio telling me that it is obsolete and replaced by ConfigurationManager !
This is chunk of code related to the problem :
Int32.Parse StartingMonth = int.parse(ConfigurationManager.AppSettings["StartingMonthColumn"]);
So , could you please help me ?
ConfigurationManager was added to support ASP.NET Core's new WebApplication model, used for simplifying the ASP.NET Core startup code.
ConfigurationManager. AppeSettings["yadayada"];
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.
it is a .net builtin mechanism to define some settings before the application starts, without recompiling. see msdn configurationmanager.
System.Configuration.dll
to the project. If you already added it, try to remove and add it again.ConfigurationManager
then press ctrl+., and see what it suggests you.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