The exact same question has been asked, but I don't understand why I am not receiving the same output.
I've tested it using the same example below (without full path)
string path = @"C:\Folder1\Folder2\Folder3\Folder4";
string newPath = Path.Combine(path, @"..\..\");
Now from the original question that was asked. The answer was the result should be:
newPath = @"C:\Folder1\Folder2\";
However I am getting this:
newPath = @"C:\\Folder1\\Folder2\\Folder3\\Folder4/..\\..\\";
EDIT: Using the line below still did not accomplish what it was supposed to do.
Path.Combine(path, "..", "..");
output using above resulted below:
"C:\\Folder1\\Folder2\\Folder3\\Folder4/../.."