C#获取当前程序集的完整路径

//获取当前程序集的完整路径加上EXE的名称
string binPath = Assembly.GetExecutingAssembly().Location;
Console.WriteLine(binPath);
//获取当前程序集的完整路径
binPath = Directory.GetCurrentDirectory();
Console.WriteLine(binPath);

//winform里获取路径

AppDomain.CurrentDomain.BaseDirectory

//合并路径

Path.Combine()

posted @ 2019-03-25 09:28  咖啡无眠  阅读(3923)  评论(0编辑  收藏  举报