I have created a C# console based project
. In that project i have some variables like companyName
, companyType
which are Strings.
Add an Application Configuration File item to your project (Right -Click Project > Add item). This will create a file called app.config
in your project.
Edit the file by adding entries like
within the
tag.
Add a reference to the System.Configuration
dll, and reference the items in the config using code like ConfigurationManager.AppSettings["keyname"]
.