Getting a list of constuctors and methods using reflection

  • Thread starter Thread starter christopher green
  • Start date Start date
C

christopher green

Dear All,

I am trying to use the Assembly.Load method to read a dll off the file
system and list the constuctor plus methods. I have found the
assembly.GetTypes method but that doesn't really offer me what I am
l;ooking for. Can anybody help?
 
Christopher,

Once you call GetTypes, it gives you an array of Types that are in the
assembly. When you have that, you can call the GetConstructor and
GetMethods methods on each Type to get the constructor and all the method
info for each type.

Hope this helps.
 
christopher green said:
I am trying to use the Assembly.Load method to read a dll off the file
system and list the constuctor plus methods. I have found the
assembly.GetTypes method but that doesn't really offer me what I am
l;ooking for. Can anybody help?

Use assembly.GetTypes() to get the types, then Type.GetMethods(),
Type.GetContructors() etc to get the rest.
 
Back
Top