Re: ConfigurationManager in Beta2
- From: "Michael Debus" <mdebus@xxxxxxxxxxx>
- Date: Mon, 11 Jul 2005 10:15:11 +0200
Hello,
System.Configuration.ConfigurationSettings.AppSettings["server"];
works.
but i'v got a warning:
Warning 2 'System.Configuration.ConfigurationSettings.AppSettings' 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]" <public_news@xxxxxxxxxxxxxxx> schrieb im Newsbeitrag
news:uRS4pldhFHA.3936@xxxxxxxxxxxxxxxxxxxxxxx
>I think it should be
> string s=System.Configuration.Configuration.AppSettings["server"];
>
>
> --
> Alex Feinman
> ---
> Visit http://www.opennetcf.org
> "Michael Debus" <mdebus@xxxxxxxxxxx> wrote in message
> news:dasved$oom$00$1@xxxxxxxxxxxxxxxxxxxx
>> Hi, I try to read a value from app.config file using this code:
>>
>> string
>> s=System.Configuration.ConfigurationManager.AppSettings["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
>>
>>
>
.
- Follow-Ups:
- Re: ConfigurationManager in Beta2
- From: Willy Denoyette [MVP]
- Re: ConfigurationManager in Beta2
- References:
- ConfigurationManager in Beta2
- From: Michael Debus
- Re: ConfigurationManager in Beta2
- From: Alex Feinman [MVP]
- ConfigurationManager in Beta2
- Prev by Date: Re: How to extract an OLE Object (Bitmap Image) from JET?
- Next by Date: Re: How to extract an OLE Object (Bitmap Image) from JET?
- Previous by thread: Re: ConfigurationManager in Beta2
- Next by thread: Re: ConfigurationManager in Beta2
- Index(es):
Relevant Pages
|