Retrieving the superTypes of a given Type object in an assembly

  • Thread starter Abdessamad Belangour
  • Start date
A

Abdessamad Belangour

Hi all,
within the same assembly, we are capable to retrieve the superTypes of a
given Type object by using the IsSubclassOf method of the Type class.
What about classes that belongs to external assemblies.
Should i get the referenced assemblies (by there names), load them and then
browse there types to find the superTypes of my given type ?
Any help would be appreciated.
Thanks.
 
A

Aravind C

Hi Belangour,

You may like to try the Type.BaseType property to get the
type information of the base class from which your present type inherits.

Regards,
Aravind C
 
R

rsarosh

I think that is the only option left for you,to load the
whole assembly and then get all the types and do the rest
of probing ... because if the class belong to external
assemlies then you get 'undefined' for Type.BaseType ...

Sarosh
 

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