[Mono-list] how to get relative path

Andrus kobruleht2 at hot.ee
Mon Jan 12 15:33:06 EST 2009


> This will break if the program is loaded from the shadow
> copy cache.


You can use CodeBase instead which works with shadow assemblies also:

String strAppDir = Path.GetDirectoryName(
                 Assembly.GetExecutingAssembly().GetName().CodeBase);

Andrus.


More information about the Mono-list mailing list