hi
i want to access value of a variable in app.config
my config file looks like
and in code behind
but it comes with an error that object reference not set to an instance of object
my .config filename was wpf1.config as i rename it to app.config it start working fine
any suggesstions
i want to access value of a variable in app.config
my config file looks like
Code:
<configuration> <applicationSettings> <wpf1.Properties.Settings> <setting name="ThreadDelay" serializeAs="String "> <value>5000</value> </setting> </wpf1.Properties.Settings> </applicationSettings> </configuration>
Code:
string delay = System.Configuration.ConfigurationSettings.AppSettings["ThreadDelay"].ToString();
but it comes with an error that object reference not set to an instance of object
my .config filename was wpf1.config as i rename it to app.config it start working fine
any suggesstions
Comment