如何在Windows窗体应用程序中获取应用程序物理路径 [英] how to get the application physical path in windows forms application
本文介绍了如何在Windows窗体应用程序中获取应用程序物理路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在Windows窗体中获取应用程序路径,我使用了下面的代码,但它说的是找不到方法"
how to get the application path in windows forms , i used the bellow code but it is saying like "method not found"
Application.ExecutablePath;
Application.StartupPath;
请建议我是否缺少任何名称空间?
please suggest me am i missing any namespace ?
预先感谢
推荐答案
这将返回您的应用程序的完整路径
This will return the complete path to your Application
System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location)
这篇关于如何在Windows窗体应用程序中获取应用程序物理路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文