获取运行文件路径

来源:互联网 发布:arcgis如何生成元数据 编辑:程序博客网 时间:2024/05/21 18:43
 

string appPath =  Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetModules()[0].FullyQualifiedName);

 

另外一个不错方法:

 

string appPath = System.IO.Path.GetDirectoryName(Environment.GetCommandLineArgs()[0]);

原创粉丝点击