C#獲取DLL、程序路徑,C#獲取桌面、收藏夾等特殊系統路徑 - 大氣象 - 博客園

C#獲取DLL、程序路徑,C#獲取桌面、收藏夾等特殊系統路徑 - 大氣象 - 博客園

瀏覽:1296
日期:2025-10-03
//獲取DLL的目錄 Assembly myAssembly = Assembly.GetEntryAssembly(); string path = myAssembly.Location; DirectoryInfo dr = new DirectoryInfo(path); path=dr.Parent; //當前目錄的上一級目錄 C#獲取程序當前路徑的方法 System.Environment.CurrentDirectory;...看更多