What's the equivalent of Path.GetDirectory()...

Giganews Newsgroups
Subject: What's the equivalent of Path.GetDirectory()...
Posted by:  mick (coughcou…@privacy.com)
Date: Sun, 11 Aug 2013

....for a web address.

Given
http://podcasts.mysite.com/podcasts/latest/latestepisode.mp3

how do I get

http://podcasts.mysite.com/podcasts/latest/

I actually tried using Path.GetDirectory() but ended up with

http:\podcasts.mysite.com\podcasts\latest\

This is for a C# WPF app.

mick

Replies