各种路径汇总

C# 2022-02-11 21:48:11

取得当前.net framework目录

string Path_FrameWork = System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory();

取得当前应用程序目录(支持xp系统)
string Path_CurAssembly = System.IO.Path.GetDirectoryName(new Uri(this.GetType().Assembly.CodeBase).LocalPath) "\\";