Obtaining System.Refelction.Module for the current module

  • Thread starter Thread starter Edward Diener
  • Start date Start date
E

Edward Diener

How do I obtain the System.Reflection.Module instance for the current module
in which I am executing ? Is there a global module instance I can retrieve
somehow or is there some other way of obtaining the current module ?
 
You can get the Assembly (using one of the few static methods on the
Assembly class (probably GetExecutingAssemby()) ) instance and from that you
can reach the Module through GetModule() (or GetLoadedModules()).
I am not sure if you can find the "current module" since the logical entity
that is executing is actually the assembly and not a module.
 
Girish said:
You can get the Assembly (using one of the few static methods on the
Assembly class (probably GetExecutingAssemby()) ) instance and from
that you can reach the Module through GetModule() (or
GetLoadedModules()).
I am not sure if you can find the "current module" since the logical
entity that is executing is actually the assembly and not a module.

I see all this. Thanks !
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top