I have a very basic VB program that obtains an IP address based on Hostname, using System.Net.Dns.GetHostEntr
y.
However it will only display a single record (the first found) for any hostname, even when I know there are multiple entries.
Here is the code
Dim Host As System.Net.IPHostEntry = System.Net.Dns.GetHostEntr
y(TextBox1
.Text)
Dim IP As System.Net.IPAddress = Host.AddressList(0)
TextBox2.Text = (IP.ToString)
The hostname is typed into a textbox and then the IP address displayed in a second text box when a button is clicked.
Nothing I can find will display more than a single entry.
Can this be done?
Start Free Trial