What works:
string relativePath = "..\\bling.txt"; string baseDirectory = "C:\\blah\\"; string absolutePath = Path.GetFullPath(baseDirectory + relativePath);
(result: absolutePath = "C: \ bling.txt")
What does not work
string relativePath = "..\\bling.txt"; Uri baseAbsoluteUri = new Uri("C:\\blah\\"); string absolutePath = new Uri(baseAbsoluteUri, relativePath).AbsolutePath;
(result: absolutePath = "C: /blah/bling.txt")
Llyle Aug 19 '09 at 11:33 2009-08-19 11:33
source share