System.UriHostNameType Enumeration
Namespace: System
Specifies the type of host name specified in a Uri.
public enum UriHostNameType
Members
-
UnknownThe host name is not a recognized type.
-
BasicThe host name is a basic host name (for example, "www.contoso.com").
-
DnsThe host name is a valid DNS host name.
-
IPv4The host name is a valid IPv4 address (for example, "192.168.0.1").
-
IPv6The host name is a valid IPv6 address (for example, "[::1]").
-
DomainThe host name is a valid domain name (e.g. contoso.com). This is the same as Dns.
Remarks
The UriHostNameType enumeration is returned by the Uri.HostNameType property.
This enumeration is used to determine the type of host name specified in a Uri. This can be useful for security purposes or for correctly formatting the Uri.