Full path with double backslash (C#)

前端 未结 4 1783
感动是毒
感动是毒 2020-12-10 05:39

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

C:\\\\Users\\\\Mammamia\\\\Videos\\\\Doc         


        
4条回答
  •  独厮守ぢ
    2020-12-10 06:20

    C:\\Users\\Mammamia\\Videos\\Documents\\CFD\\geo_msh\\cubeOp.txt is not a valid path, so I'm not sure why you'd want it, but:

    Path.GetFullPath(yourPath).Replace("\\", "\\\\");
    

提交回复
热议问题