OK. So you're using 2003. No, you can't use .NET 2.0 with VS.NET 2003. It will only work with VS.NET 2005. Remove the .Address part of the line. You don't need it unless you want the IP address returned as a 32-bit number. This isn't supported in .NET 2.0, so don't use it. This code works just fine:
Dim hostInfo As IPHostEntry = Dns.GetHostByName("www.yahoo.com")
Dim address As IPAddress() = hostInfo.AddressList
Dim al As String() = hostInfo.Aliases
Debug.WriteLine("Host name : " + hostInfo.HostName)
Debug.WriteLine(ControlChars.Cr + "Aliases : ")
Dim index As Integer
For index = 0 To al.Length - 1
Debug.WriteLine(al(index))
Next index
Debug.WriteLine(ControlChars.Cr + "IP address list : ")
For index = 0 To address.Length - 1
Debug.WriteLine(address(index))
Next index
and was taken directly out of the docs for Dns.GetHostByName in the .NET 1.0/1.1 docs.
Dave Kreskowiak Microsoft MVP - Visual Basic