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!!!
Dekel C.
You know the location of the executable from Application.StartupPath. If your library may be in another location then you could use reflection: Code: System.Reflection.Assembly.GetExecutingAssembly().Location; There are some provisos with that property though, so you should read its help topic.
System.Reflection.Assembly.GetExecutingAssembly().Location;
Why is my data not saved to my database? | MSDN Data Walkthroughs VBForums Database Development FAQ My CodeBank Submissions: VB | C# My Blog: Data Among Multiple Forms (3 parts) Beginner Tutorials: VB | C# | SQL
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.
Forum Rules