سؤال

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