Reputation:
In my usings I have:
using System.Configuration;
And then in the code I have:
string primary_adrs_key = ConfigurationManager.AppSettings["PrimaryAddressK"];
But I get the error:
"The name ConfigurationManager does not exist in the current context"
Why? What am I missing?
Upvotes: 6
Views: 2887
Reputation: 223362
You haven't added reference to System.Configuration. Right click on project and click add references.
Upvotes: 3
Reputation: 222712
Read ConfigurationManager
Add the reference System.Configuration.dll in your project
Upvotes: 11