净 - 从路径删除点路径

2023-09-03 16:05:23 作者:南笙几梦

如何转换的C:\富\ .. \酒吧到C:\吧?

解决方案

 字符串路径= Path.GetFullPath(C:\\ \\ foo的.. \\条); // PATH =C:\\栏
 

更多信息

How can I convert "c:\foo\..\bar" into "c:\bar"?

解决方案 ai怎么删除这部分重叠的路径啊

string path = Path.GetFullPath("C:\\foo\\..\\bar"); // path = "C:\\bar"

More Info