Getting the path of the running assembly.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I wonder... How can i get the path of a certain assembly loaded by an executable...

In C++ I would use GetModuleFileName in combination with the handle that was recieved through DllMain to get the full DLL path, How could I do the same using c#

Nadav.
 
Get the instance of the Assembly class representing the assembly in question
and examine its CodeBase and Location properties.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://www.x-unity.net/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

Nadav said:
I wonder... How can i get the path of a certain assembly loaded by an executable....

In C++ I would use GetModuleFileName in combination with the handle that
was recieved through DllMain to get the full DLL path, How could I do the
same using c#?
 
Back
Top