C#-取目录的父路径
string appPath=Path.GetDirectoryName("文件路径") ; // 获取文档的目录
string str1=Directory.GetParent(appPath).FullName; // 目录的父
string str2=Directory.GetParent(appPath).Parent.FullName; // 目录的父的父
本文来自博客园,作者:꧁执笔小白꧂,转载请注明原文链接:https://www.cnblogs.com/qq2806933146xiaobai/p/17317714.html