IPEndPoint.Create creates an endpoint from a socket address.
Imports System.IO
Imports System.Net
Imports System.Text
Public Class MainClass
Shared Sub Main()
Dim endpoint As New IPEndPoint(0, 0)
Dim socketAddress As SocketAddress = endpoint.Serialize()
Dim clonedIPEndPoint As IPEndPoint = CType(endpoint.Create(SocketAddress), IPEndPoint)
Console.WriteLine(("clonedIPEndPoint: " + clonedIPEndPoint.ToString()))
End Sub
End Class
Related examples in the same category