2018-2-13-C#-相对路径转绝对路径

title author date CreateTime categories
C# 相对路径转绝对路径
lindexi
2018-2-13 17:23:3 +0800
2018-2-13 17:23:3 +0800
C#

如果是路径相对路径,使用 Path 转换

  System.IO.Path.Combine(文件夹, relativePath);

文件夹就是相对的文件夹。

这样就可以把相对路径转绝对。

参见:http://stackoverflow.com/questions/4796254/relative-path-to-absolute-path-in-c

posted @ 2019-11-21 16:04  lindexi  阅读(54)  评论(0编辑  收藏  举报