获取exe目录

System.IO.Directory.GetCurrentDirectory()
这个方法,会随着你的当前系统路径的改变而改变.比如你打开一个openFileDialog那么,再次获得路径就不对了。
string m_PathStr = Application.ExecutablePath;
是能获得全部,包括exe文件名的一串东西比如c:\abc\abc.exe
Application.StartupPath
能够获得当前的运行路径,不包括执行文件名

posted @ 2015-05-21 09:21  苦力劳动者  阅读(320)  评论(0编辑  收藏  举报