第一种:
DirectoryInfo di = new DirectoryInfo(string.Format(@"{0}..\..\", Application.StartupPath));
di.FullName
..\有几个就是往回退几层
第二种:
DirectoryInfo info = new DirectoryInfo(Application.StartupPath);
String path = info.Parent.Parent.FullName;
第三种:
string WantedPath = Application.StartupPath.Substring(0,Application.StartupPath.LastIndexOf(@"\"));