Domanda

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.

È stato utile?

Soluzione

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top