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 !
 
Back
Top