I'm trying to retrieve the current path of a file from a project in windows mobile 6 application. 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.

有帮助吗?

解决方案

You can use typeof(SomeType).Assembly.GetName().CodeBase, where SomeType is any type in the desired DLL.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top