문제

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