That's not guaranteed to give you the directory where the application
is, as the current directory can be changed through SetCurrentDirectory API.
A better solution would be to call the static GetEntryAssembly method on
the Assembly class, and then on that use the Location property or CodeBase
property (if shadow copying is a concern).
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Morten Wennevik [C# MVP]" <Mo************@hotmail.comwrote in message
news:op.twb8uuh3dj93y5@stone...
On Tue, 31 Jul 2007 18:35:44 +0200, Thanh-Nhan Le <tn*******@yahoo.de>
wrote:
>Hi,
Is there any function to retrieve the application's path, path of the exe
file (as the property app.path of VB6).
thanks
Nhan
Hi Nhan,
Try Environment.CurrentDirectory
--
Happy coding!
Morten Wennevik [C# MVP]