Get Port and Scheme from a Uri : Uri « Socket Network « VB.Net Tutorial






Imports System.Net
Imports System.Net.Sockets


Public Class Tester
    Public Shared Sub Main
        Dim myURI As New Uri("http://www.java2s.com:8080")

        Console.WriteLine(myURI.Host)
        Console.WriteLine(myURI.AbsolutePath)
        Console.WriteLine(myURI.AbsoluteUri)
        Console.WriteLine(myURI.Port.ToString)
        Console.WriteLine(myURI.Scheme)

    End Sub
End Class
www.java2s.com
/
http://www.java2s.com:8080/
8080
http








22.2.Uri
22.2.1.Create Uri object and get AbsolutePath and AbsoluteUri
22.2.2.Get Port and Scheme from a Uri
22.2.3.Uri.CheckHostName
22.2.4.URL properties
22.2.5.Uri Host Name Type