It is not enough to add the reference in the code. You have to manually add the reference using Add reference. If not ConfigurationManager wont visible.
using System.Collections.Specialized;
using System.Collections;
using System.Configuration;
NameValueCollection appSettings = ConfigurationManager.AppSettings;
string userName = appSettings["UserName"].ToString();
No comments:
Post a Comment