Obsolete functions

Obsolete functions

am 01.02.2008 19:50:22 von John

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

Re: Obsolete functions

am 01.02.2008 23:05:59 von Peter Duniho

On Fri, 01 Feb 2008 10:50:22 -0800, John 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