Uri.Segments Property gets an array containing the path segments that make up the specified URI.
Imports System.IO
Imports System.Net
Imports System.Text
public class MainClass
Shared Sub Main()
Dim uriAddress1 As New Uri("http://a.com/title/index.htm")
Console.WriteLine("The parts are {0}, {1}, {2}", uriAddress1.Segments(0), uriAddress1.Segments(1), uriAddress1.Segments(2))
End Sub
End Class
Related examples in the same category