DnsEndPoint Class

DnsEndPoint Class

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

Represents a network endpoint as a host name or a string representation of an IP address and a port number.

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

public sealed class DnsEndPoint : EndPoint

The DnsEndPoint type exposes the following members.

  NameDescription
Public methodDnsEndPoint(String, Int32)Initializes a new instance of the DnsEndPoint class with the host name or string representation of an IP address and a port number.
Public methodDnsEndPoint(String, Int32, AddressFamily)Initializes a new instance of the DnsEndPoint class with the host name or string representation of an IP address, a port number, and an address family.
Top

  NameDescription
Public propertyAddressFamilyGets the Internet Protocol (IP) address family. (Overrides EndPoint.AddressFamily.)
Public propertyHostGets the host name or string representation of the Internet Protocol (IP) address of the host.
Public propertyPortGets the port number of the DnsEndPoint.
Top

  NameDescription
Public methodCreateCreates an EndPoint instance from a SocketAddress instance. (Inherited from EndPoint.)
Public methodEqualsCompares two DnsEndPoint objects. (Overrides Object.Equals(Object).)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeReturns a hash value for a DnsEndPoint. (Overrides Object.GetHashCode().)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodSerializeSerializes endpoint information into a SocketAddress instance. (Inherited from EndPoint.)
Public methodToStringReturns the host name or string representation of the IP address and port number of the DnsEndPoint. (Overrides Object.ToString().)
Top

The DnsEndPoint class contains a host name or an IP address and remote port information needed by an application to connect to a service on a host. By combining the host name or IP address and port number of a service, the DnsEndPoint class forms a connection point to a service.

Capabilities

If you use this API in your app, you must specify the following capabilities in the app manifest. Otherwise, your app might not work correctly or it might exit unexpectedly.

ID_CAP_NETWORKING

Windows Phone 8, Windows Phone OS 7.1

For more info, see App capabilities and hardware requirements for Windows Phone 8.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Show:
© 2016 Microsoft