C# 获取相对路径的字符串

目录结构

father 

  |—— subfolder1

  |—— subfolder2

 

当前在 subfolder1, 通过相对路径的方式获取 subfolder2的路径

1  string path = Path.GetFullPath(Path.Combine("subfolder1",@"../subfolder2/"));

 

posted @ 2016-11-11 13:52  Panda Fang  阅读(1343)  评论(0编辑  收藏  举报