标签:pat bsp ppa span block start 文件路径 path cat
1、
DirectoryInfo di = new DirectoryInfo(string.Format(@"{0}..\..\", Application.StartupPath));
di.FullName 就是你想要的
..\有几个就是往回退几层
2、
DirectoryInfo info = new DirectoryInfo(Application.StartupPath); String path = info.Parent.Parent.FullName;
3、
string WantedPath = Application.StartupPath.Substring(0,Application.StartupPath.LastIndexOf(@"\"));
标签:pat bsp ppa span block start 文件路径 path cat
原文地址:https://www.cnblogs.com/dinght92/p/10469532.html