string s = "~/Uploads/18/MyImage.png";
string s = s.SubString( 0, s.LastIndexOf( "/" ) - 1 ); (since it is a path,
you are guaranteed to not have any / in the filename...I think)
bill
"Arjen" <bo*****@hotmail.com> wrote in message
news:bg**********@news2.tilbu1.nb.home.nl...
Hello,
I have a string like this:
~/Uploads/18/MyImage.png
Now I only need the directory like this:
~/Uploads/18/
What's the best way to do this?
Or how can I do this in C#?
Thanks!