The documentation at http://msdn.microsoft.com/en-us/library/system.urihostnametype.aspx and http://msdn.microsoft.com/en-us/library/system.uri.checkhostname.aspx is a bit unclear.
Uri.CheckHostName(string)
returns UriHostNameType.Dns
for a valid DNS hostname, and it returns UriHostNameType.Unknown
when the string contains invalid characters and so on. Under what conditions does this method ever return UriHostNameType.Basic
?
Now the .NET Core is open source we can know for sure.
Just like Mono, it never returns UriHostNameType.Basic
.