Get the assembly you are interested in (for example, assigned to the variable System.Reflection.Assembly a ):
System.Reflection.Assembly.GetEntryAssembly() , ortypeof(X).Assembly for class X , which is in the assembly you are interested in (for Windows Forms, you can use typeof(Program) )
Then enter the path from which the file from which this assembly a was loaded was downloaded:
System.IO.Path.GetDirectoryName(a.Location)
The Application object from a Windows Forms application is also a feature, as explained in other answers.
peSHIr Aug 03 '09 at 13:14 2009-08-03 13:14
source share