Obsolete functions

Hi

I am getting obsolete function warnings on these two liens but can't figure
the correct syntax for the new equivalent functions;

ConfigurationSettings.AppSettings.Get(key)
Dns.GetHostByName(_strServer)

Would appreciate if someone can give me some hints to get rid of the
obsolete function warnings on these two lines.

Thanks

Regards
John [ Fr, 01 Februar 2008 19:50 ] [ ID #1921565 ]

Re: Obsolete functions

On Fri, 01 Feb 2008 10:50:22 -0800, John <John [at] nospam.infovis.co.uk> wrote:

> [...]
> ConfigurationSettings.AppSettings.Get(key)
> Dns.GetHostByName(_strServer)
>
> Would appreciate if someone can give me some hints to get rid of the
> obsolete function warnings on these two lines.

I thought alternatives were documented somewhere, but I don't see them at
the moment.

I suspect that the ConfigurationSettings alternative they expect you to
use is the Settings class, which the VS designer knows about and which you
can get from your project's namespace.

For sure, you can use Dns.GetHostEntry() as an alternative to
GetHostByName().

Pete
Peter Duniho [ Fr, 01 Februar 2008 23:05 ] [ ID #1921570 ]
Microsoft » microsoft.public.dotnet.general » Obsolete functions

Vorheriges Thema: Parameterised query with an ms access table
Nächstes Thema: ASP.NET 3.5 AJAX problem