I can never remember how to get the file path of a .NET Framework assembly, so I thought I’d post it here once and for all.
string strProgramPath = typeof(Program).Assembly.Location;
That is all.
Posted by Ed Ball on September 19, 2008