how to recover all uri but the filename ?
Posted on 2010-11-22
i have an Uri object that i'd like to use in order to create a new file.
i'd like to change the last info in the Uri in order to keep the path.
is there an easy way to achieve this ?
Uri test = new Uri(@"c:\path\to\the\file.txt"); // 1. i have an Uri.
ChangeFile(test, "otherFile.txt") // 2. change the file for the same uri
Uri test -> c:\path\to\the\otherFile.txt // 3. now my uri is changed.
thank you in advance.