Hello,
System.Configuration.ConfigurationSettings.AppSett ings["server"];
works.
but i'v got a warning:
Warning 2 'System.Configuration.ConfigurationSettings.AppSet tings' is
obsolete: 'This method is obsolete, it has been replaced by
ConfigurationManager.AppSettings'
i tryed to follow Microsofts suggestion to use ConfigurationManager.
Michael
"Alex Feinman [MVP]" <pu*********@alexfeinman.com> schrieb im Newsbeitrag
news:uR**************@TK2MSFTNGP10.phx.gbl...
I think it should be
string s=System.Configuration.Configuration.AppSettings["server"];
--
Alex Feinman
---
Visit http://www.opennetcf.org
"Michael Debus" <md****@orcasoft.de> wrote in message
news:da*************@news.t-online.com... Hi, I try to read a value from app.config file using this code:
string
s=System.Configuration.ConfigurationManager.AppSet tings["server"].ToString();
I got the compiler error:
Error 1 The type or namespace name 'ConfigurationManager' does not exist
in the namespace 'System.Configuration' (are you missing an assembly
reference?) .
A reference to System.Configuration.dll is added to the project.
My System.Configuration.dll has Version 2.0.50215.44. I there a newer
version ?
Thanks
Michael