如何使用C#在Windows Mobile应用程序中获取完整的应用程序路径? [英] how to get the full Application path in windows mobile application using C#?

查看:62
本文介绍了如何使用C#在Windows Mobile应用程序中获取完整的应用程序路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在开发Windows Mobile应用程序,我需要在其中获取完整的应用程序路径.为此,我使用以下代码:

Hi,

I am developing a windows mobile application in which I need to get full application path. For this I am using the below code:

string sStartupPath = Path.GetDirectoryName(this.GetType().Assembly.GetModules()[0].FullyQualifiedName);



但这并没有给我完整的名字,所以您能建议我如何获得它吗?

在此先感谢.



But it is not giving me the fully qualified name so can you please suggest me how to get this?

Thanks in advance.

推荐答案

在Windows XP上运行的.NET 2.0中,这将是Application.StartupPath,但是从快速查看文档的过程中,我无法确定是否它将适用于Windows Mobile.
In .NET 2.0 running on Windows XP this would be Application.StartupPath but from a quick look at the docs I can''t say whether it will work for Windows Mobile.


这篇关于如何使用C#在Windows Mobile应用程序中获取完整的应用程序路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆