How to load a module through an assembly

G

Guest

Dear Friends,

I'm able to create a class type from a non-referenced assembly using the
LoadFrom and CreateInstance methods of the Assembly type.
But how can I load a module from a corresponding ".dll" using assembly ?
Please anyone help me.

Thanking you,

Regards,
Arun.
 
H

Herfried K. Wagner [MVP]

Arun said:
I'm able to create a class type from a non-referenced assembly using the
LoadFrom and CreateInstance methods of the Assembly type.
But how can I load a module from a corresponding ".dll" using assembly ?

Modules are classes which are marked with a certain attribute. Check out
the exact structure using "ILDASM.EXE" or Lutz Roeder's Reflector.
 
A

Armin Zingler

Arun said:
Dear Friends,

I'm able to create a class type from a non-referenced assembly using the
LoadFrom and CreateInstance methods of the Assembly type.
But how can I load a module from a corresponding ".dll" using assembly ?
Please anyone help me.


A module is an imported class with shared methods only, so you can't call
CreateInstance, but after retrieving the System.Type object, you can call
InvokeMember (or other methods) to access the type's shared members.


Armin
 

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

Top