Export (0) Print
Expand All

IPEndPoint.AddressFamily Property

Gets the Internet Protocol (IP) address family.

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

'Declaration
Public Overrides ReadOnly Property AddressFamily As AddressFamily

Property Value

Type: System.Net.Sockets.AddressFamily
One of the AddressFamily values.

The AddressFamily indicates the address family for an instance of the IPEndPoint class.

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



Dim ipAddr2 As IPAddress = IPAddress.IPv6Loopback
Dim port2 As Integer = 80

Dim endpoint2 As IPEndPoint = new IPEndPoint(ipAddr2,port2)

outputBlock.Text &= "IPEndPoint.Address: "
outputBlock.Text &= endpoint2.Address.ToString()
outputBlock.Text &= vbCrLf

outputBlock.Text &= "IPEndPoint.AddressFamily: "
outputBlock.Text &= endpoint2.AddressFamily
outputBlock.Text &= vbCrLf

outputBlock.Text &= "IPEndPoint.Port: "
outputBlock.Text &= endpoint2.Port
outputBlock.Text &= vbCrLf

outputBlock.Text &= "IPEndPoint.ToString(): "
outputBlock.Text &= endpoint2.ToString()
outputBlock.Text &= vbCrLf


Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft