Mega Code Archive

 
Categories / C# / Network
 

Gets an array containing the path segments that make up the specified URI

using System; public class MainClass{    public static void Main(){         Uri uriAddress1 = new Uri("http://www.yourDomain.com/title/index.htm");         Console.WriteLine("The parts are {0}, {1}, {2}", uriAddress1.Segments[0], uriAddress1.Segments[1], uriAddress1.Segments[2]);    } }