Uri.CheckSchemeName tells whether the specified scheme name is valid.
Imports System.IO
Imports System.Net
Imports System.Text
publicclass MainClass
Shared Sub Main()
Dim address1 As New Uri("http://www.yourdomain.com/index.htm#search")
Console.WriteLine(Uri.CheckSchemeName(address1.Scheme))
If address1.Scheme = Uri.UriSchemeHttp Then
Console.WriteLine("Uri is HTTP type")
End If
Console.WriteLine(address1.HostNameType)
End Sub
End Class