Getting the Location of the executing Assembly on the .NET Compact Framework
Had some time today to familirize myself with the .NET Compact Framework. Took me some time to find out how to get the location of the program on the device. Here is what i came up with afer some research.
System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)Marc
Comments (2)
A bit misleading
Well, your tip pointed me to the right direction, but i think it's a bit misleading. When you say Location, you are meaning the directory where the assembly is located. To get the exact same value that is returned from the property Location in class Assembly, you should use Path.GetFullPath method instead.
developer
I'm pretty sure the Path.GetFullPath method is not included in the Compact Framework. Since the example is for doing it within the Compact Framework... you comment is probably mute.
