Wednesday, December 26, 2007

How To: Determine The Executing Application's Path

Did you discovered that

Application.StartupPath;


System.Windows.Forms.Application.StartupPath;


not available in Microsoft .NET Compact Framework?

However, you can get the device application startup path by using the alternative below.

System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);


For more information, please refer to How To: Determine the Executing Application's Path.

Hope this helps!

No comments: