from:http://www.dengyukeji.com/thread-135-1-1.html
//獲取當前運行路徑的上級目錄(父目錄)
System.IO.DirectoryInfo topDir = System.IO.Directory.GetParent(System.Environment.CurrentDirectory);
//繼續獲取上級的上級的上級的目錄。
string pathto = topDir.Parent.Parent.FullName;
//注意一個Parent獲取上一級的目錄。