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

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

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

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

 

C# 相对路径转绝对路径_dotnet