Export (0) Print
Expand All

IPEndPoint.Address Property

Gets or sets the IP address of the endpoint.

Namespace:  System.Net
Assembly:  System (in System.dll)

'Declaration
Public Property Address As IPAddress
'Usage
Dim instance As IPEndPoint 
Dim value As IPAddress 

value = instance.Address

instance.Address = value

Property Value

Type: System.Net.IPAddress
An IPAddress instance containing the IP address of the endpoint.

The following example sets the Address property using the IPAddress specified.

Private Shared Sub displayEndpointInfo(ByVal endpoint As IPEndPoint)
  Console.WriteLine("Endpoint Address : " + endpoint.Address.ToString())
  Console.WriteLine("Endpoint AddressFamily : " + endpoint.AddressFamily.ToString())
  Console.WriteLine("Endpoint Port : " + endpoint.Port.ToString())
  Console.WriteLine("Endpoint ToString() : " + endpoint.ToString())

  Console.WriteLine("Press any key to continue.")
  Console.ReadLine()
End Sub 'displayEndpointInfo
void displayEndpointInfo(IPEndPoint* endpoint)
{
   Console::WriteLine(S"Endpoint->Address : {0}", endpoint->Address);
   Console::WriteLine(S"Endpoint->AddressFamily : {0}", __box(endpoint->AddressFamily));
   Console::WriteLine(S"Endpoint->Port : {0}", __box(endpoint->Port));
   Console::WriteLine(S"Endpoint.ToString() : {0}", endpoint);

   Console::WriteLine(S"Press any key to continue.");
   Console::ReadLine();
}

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 3.5, 2.0, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft