from:http://www.dengyukeji.com/thread-135-1-1.html
//获取当前运行路径的上级目录(父目录)
 System.IO.DirectoryInfo topDir = System.IO.Directory.GetParent(System.Environment.CurrentDirectory);
//继续获取上级的上级的上级的目录。
string pathto = topDir.Parent.Parent.FullName;
//注意一个Parent获取上一级的目录。

相关文章:

  • 2021-11-27
  • 2022-12-23
  • 2022-12-23
  • 2021-06-17
  • 2022-12-23
  • 2021-11-23
  • 2022-02-04
  • 2021-08-01
猜你喜欢
  • 2021-10-28
  • 2022-01-13
  • 2021-12-22
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案