by Vitaly Zayko
14. December 2008 23:00
In this post I explained how to find this directory in .NET Compact Framework. Here is how to do this in desktop Applications.
If you are working on a Windows Forms App you, can make this call:
System.IO.Path.GetDirectoryName(Application.ExecutablePath);
In non-WinForms Apps use this:
System.IO.Path.GetDirectoryName(
System.Reflection.Assembly.GetEntryAssembly().Location);
Note that last back slash is not included.