I'm trying to join a Windows path with a relative path using
C:\blah\..\bling instead of
Does anyone know how to accomplish this without writing my own relative path resolver (which shouldn't be too hard)?
string relativePath = "..\\bling.txt"; string baseDirectory = "C:\\blah\\"; string absolutePath = Path.GetFullPath(baseDirectory + relativePath);
What doesn't work
string relativePath = "..\\bling.txt"; Uri baseAbsoluteUri = new Uri("C:\\blah\\"); string absolutePath = new Uri(baseAbsoluteUri, relativePath).AbsolutePath;