Uri.CheckHostName : Uri « System « VB.Net by API






Uri.CheckHostName

  

Imports System.Net
Imports System.Net.Sockets


Public Class Tester
    Public Shared Sub Main

        Select Case Uri.CheckHostName("www.java2s.com")
            Case UriHostNameType.Basic
                Console.WriteLine("Basic")
            Case UriHostNameType.Dns
                Console.WriteLine("Dns")
            Case UriHostNameType.IPv4
                Console.WriteLine("IPv4")
            Case UriHostNameType.IPv6
                Console.WriteLine("IPv6")
            Case UriHostNameType.Unknown
                Console.WriteLine("Unknown")
        End Select

    End Sub
End Class

   
    
  








Related examples in the same category

1.Uri.AbsolutePath
2.Uri.AbsoluteUri
3.Uri.Port
4.Uri.Scheme
5.Uri.UserEscaped
6.Uri.UserInfo