Cannot access app.config or settings.settings data
- by J Carron
I have 3.5 application needed to load a string from settings.settings or app.config. I made sure have reference to ConfigurationManager but very simple
call from form load value returns null here is code.
void LoadSettings()
{
// I expect to get from my app.config or settings.settings
// Settings file set to application, public
m_connStr = System.Configuration.ConfigurationManager.AppSettings["somestring"];
// m_connStr is getting Null. I tried .ToString(); That throws a null exception.
}