[英]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.