取得執行檔的目錄 string path = Directory.GetCurrentDirectory(); or string str = System.AppDomain.CurrentDomain.BaseDirectory;