(to loop from 192.168.0.1 to 192.168.0.255) and get all the host names?You should be able to modify the above to accomplish this. I don't have a DNS server to test against, but I believe it should be:
Module Module1
Sub Main()
Const base As String = "192.168.0."
For curr As Integer = 1 To 255
Dim ip As System.Net.IPHostEntry = System.Net.Dns.GetHostEntry(base & curr.ToString())
Console.WriteLine(ip.HostName)
Next
Console.ReadKey()
End Sub
End Module
Visual Basic .NET (VB.NET) is an object-oriented programming language implemented on the .NET framework, but also supported on other platforms such as Mono and Silverlight. Microsoft launched VB.NET as the successor to the Visual Basic language. Though it is similar in syntax to Visual Basic pre-2002, it is not the same technology,
TRUSTED BY
ASKER
How do I this the other way around.
(to loop from 192.168.0.1 to 192.168.0.255) and get all the host names?