Hello!!
I am making a dll and want to know at run-time in which folder it is
installed.
how can I do that?
thanks!!!
Printable View
Hello!!
I am making a dll and want to know at run-time in which folder it is
installed.
how can I do that?
thanks!!!
You know the location of the executable from Application.StartupPath. If your library may be in another location then you could use reflection:There are some provisos with that property though, so you should read its help topic.Code:System.Reflection.Assembly.GetExecutingAssembly().Location;
ok... thats' great for applications...
but what if I have a dll that I built and want to get his path from the
run-time of the dll?
GetExecutingAssembly gets a reference to the current assembly, whatever that is.