天天看點

[轉] C# 擷取程式運作目錄

// 擷取程式的基目錄。  System.AppDomain.CurrentDomain.BaseDirectory

// 擷取子產品的完整路徑。 System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName

// 擷取和設定目前目錄(該程序從中啟動的目錄)的完全限定目錄。 System.Environment.CurrentDirectory

// 擷取應用程式的目前工作目錄。 System.IO.Directory.GetCurrentDirectory()

// 擷取和設定包括該應用程式的目錄的名稱。 System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase

// 擷取啟動了應用程式的可執行檔案的路徑。 System.Windows.Forms.Application.StartupPath

// 擷取啟動了應用程式的可執行檔案的路徑及檔案名。 System.Windows.Forms.Application.ExecutablePath

沒有整理與歸納的知識,一文不值!高度概括與梳理的知識,才是自己真正的知識與技能。 永遠不要讓自己的自由、好奇、充滿創造力的想法被現實的架構所束縛,讓創造力自由成長吧! 多花時間,關心他(她)人,正如别人所關心你的。理想的騰飛與實作,沒有别人的支援與幫助,是萬萬不能的。

    本文轉自wenglabs部落格園部落格,原文連結:http://www.cnblogs.com/arxive/p/5782064.html,如需轉載請自行聯系原作者