Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.
VB.Net: How to create an IPv4 address the correct way
From Wiki
YOu are best to use System.Net.IPAddress for this
in code that would look like this.
- Imports System.IO
- Module Module1
- Sub Main()
- Dim _IPAddress As System.Net.IPAddress
- _IPAddress = New System.Net.IPAddress(New Byte() {125, 23, 23, 4})
- Console.WriteLine(_IPAddress.ToString)
- Console.ReadLine()
- End Sub
- End Module
the constructor also accepts a long. But for version 4 addresses it is eassier to ue a byte array with 4 elements as shown above.



LTD Social Sitings
Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.