G
GaryDean
I am accustomed to getting values from Web.config files in asp.net
applications but now I am trying to do the same from a Froms app and I'm
having some problems. I have the following in my app.config...
<applicationSettings>
<appSettings>
<add key="myKey" value="myValue" />
</appSettings>
in my code I have...
AppSettingsReader myAppSettingsReader = new AppSettingsReader();
string strTest = (string)myAppSettingsReader.GetValue("myKey",
GetType(System.String));
The compiler does not like "String" in System.String saying string is a type
which is not valid in the given context. I have used this same code in asp
apps.
What's wrong with this statement?
applications but now I am trying to do the same from a Froms app and I'm
having some problems. I have the following in my app.config...
<applicationSettings>
<appSettings>
<add key="myKey" value="myValue" />
</appSettings>
in my code I have...
AppSettingsReader myAppSettingsReader = new AppSettingsReader();
string strTest = (string)myAppSettingsReader.GetValue("myKey",
GetType(System.String));
The compiler does not like "String" in System.String saying string is a type
which is not valid in the given context. I have used this same code in asp
apps.
What's wrong with this statement?