IPEndPoint Constructor (Int64, Int32)
.NET Framework 2.0
Initializes a new instance of the IPEndPoint class with the specified address and port number.
Namespace: System.Net
Assembly: System (in system.dll)
Assembly: System (in system.dll)
'Declaration Public Sub New ( _ address As Long, _ port As Integer _ ) 'Usage Dim address As Long Dim port As Integer Dim instance As New IPEndPoint(address, port)
public IPEndPoint ( long address, int port )
public function IPEndPoint ( address : long, port : int )
Parameters
- address
The IP address of the Internet host.
- port
The port number associated with the address, or 0 to specify any available port. port is in host order.
The following example uses the specified IP address and port number to create an IPEndPoint.
Dim hostIPAddress1 As IPAddress = Dns.Resolve(hostString1).AddressList(0) Dim hostIPEndPoint As New IPEndPoint(hostIPAddress1, 80) Console.WriteLine((ControlChars.Cr + "IPEndPoint information:" + hostIPEndPoint.ToString())) Console.WriteLine((ControlChars.Cr + ControlChars.Tab + "Maximum allowed Port Address :" + IPEndPoint.MaxPort.ToString())) Console.WriteLine((ControlChars.Cr + ControlChars.Tab + "Minimum allowed Port Address :" + IPEndPoint.MinPort.ToString())) Console.WriteLine((ControlChars.Cr + ControlChars.Tab + "Address Family :" + hostIPEndPoint.AddressFamily.ToString()))
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.