C# 获取相对路径的字符串
目录结构
father
|—— subfolder1
|—— subfolder2
当前在 subfolder1, 通过相对路径的方式获取 subfolder2的路径
1 string path = Path.GetFullPath(Path.Combine("subfolder1",@"../subfolder2/"));
目录结构
father
|—— subfolder1
|—— subfolder2
当前在 subfolder1, 通过相对路径的方式获取 subfolder2的路径
1 string path = Path.GetFullPath(Path.Combine("subfolder1",@"../subfolder2/"));