Address Property
Collapse the table of content
Expand the table of content

IPEndPoint.Address Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets or sets the IP address of the endpoint.

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

public IPAddress Address { get; set; }

Property Value

Type: System.Net.IPAddress
IP address of the endpoint.

The following example displays the Address property of the IPEndPoint specified.



IPAddress ipAddr2 = IPAddress.IPv6Loopback;
int port2 = 80;

IPEndPoint endpoint2 = new IPEndPoint(ipAddr2,port2);

outputBlock.Text += "IPEndPoint.Address: ";
outputBlock.Text += endpoint2.Address;
outputBlock.Text += "\n";

outputBlock.Text += "IPEndPoint.AddressFamily: ";
outputBlock.Text += endpoint2.AddressFamily;
outputBlock.Text += "\n";

outputBlock.Text += "IPEndPoint.Port: ";
outputBlock.Text += endpoint2.Port;
outputBlock.Text += "\n";

outputBlock.Text += "IPEndPoint.ToString(): ";
outputBlock.Text += endpoint2.ToString();
outputBlock.Text += "\n";


Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

Show:
© 2017 Microsoft