简体   繁体   English

从解决方案中获取Windows Mobile 6 CE中当前类库的文件路径

[英]Get file path of the current class library in Windows Mobile 6 CE from the solution

I'm trying to retrieve the current path of a file from a project in windows mobile 6 application. 我正在尝试从Windows Mobile 6应用程序中的项目中检索文件的当前路径。 I've tried using 我试过使用

System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase; 

This doesn't retrieve the file path I'm looking for as the file I'm calling is in a different Class library of the solution. 由于要调用的文件位于解决方案的其他类库中,因此这不会检索我要查找的文件路径。 Can anyone help me out in retrieving the file path for the class library of the solution which isn't the executing assembly. 任何人都可以帮助我检索不是执行程序集的解决方案的类库的文件路径。

Thanks, Vinod. 谢谢,维诺德。

您可以使用typeof(SomeType).Assembly.GetName().CodeBase ,其中SomeType是所需DLL中的任何类型。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从 c# 中的类文件更新窗体 GUI for windows CE (Windows Mobile 6.5.3 ) CF 3.5 设备 - How to update the form GUI from a class file in c# for windows CE (Windows Mobile 6.5.3 ) Devices with CF 3.5 如何在Windows CE设备上指定文件的路径? - How to specify the path to a file on a Windows CE device? 如何获得具有5个项目解决方案的文件的当前项目路径 - How to get Current Project path of the file having 5 project solution 计算Windows Mobile / CE设备上的当前CPU使用率 - Calculating the current CPU usage on a Windows Mobile/CE device 如何在类库中获取内容的文件路径 - How to get file path of content in class library 如何从c#动态地从SQL Server CE [Windows mobile]运行SQL脚本文件? - How to run SQL script file from SQL Server CE [Windows mobile] from c# dynamically? 如何从Windows CE移动设备访问文件到我的桌面应用程序? - How Can I access File from Windows CE mobile to my desktop application? 从Windows Mobile 6.1中的文本文件或DataTable批量插入SQL Server CE - Bulk insert in SQL Server CE from text file or DataTable in Windows Mobile 6.1 从当前项目获取文件路径 - get file path from current project 类库中的文件路径 - path to file in class library
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM