C# 获取exe的上一级目录

DirectoryInfo path_exe = new DirectoryInfo(Application.StartupPath); //exe目录
String path = path_exe.Parent.Parent.FullName; //上两级的目录

你可能感兴趣的:(C#)