Search code examples
c#filepath

Full path with double backslash (C#)


Is it possible to get a full path with double backslash by using Path.GetFullPath? Something like this:

C:\\Users\\Mammamia\\Videos\\Documents\\CFD\\geo_msh\\cubeOp.txt

instead of this:

C:\Users\Mammamia\Videos\Documents\CFD\geo_msh\cubeOp.txt

Or is there any other method?


Solution

  • Do you mean this?

    Path.GetFullPath(path).Replace(@"\", @"\\");