static Logger() { if (string.IsNullOrEmpty(DllDir)) { AssemblyDataExt ass = new AssemblyDataExt(); DllDir = ass.GetAssemblyDir(); } }
public static string GetParentDir(int level) { AssemblyDataExt ass = new AssemblyDataExt(); string app = ass.GetAssemblyDir(); while (level > 0) { DirectoryInfo di = new DirectoryInfo(app); if (di.Root.FullName == app) { return(app); } app = di.Parent.FullName; level--; } return(app); }