Find out if a class is inherited from a certain other class

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can you find out if a class is inherited from a certain other class? Is
there another way than using .BaseType several times?
 
Joachim said:
How can you find out if a class is inherited from a certain other class?
Is
there another way than using .BaseType several times?
 
How can you find out if a class is inherited from a certain other
class? Is there another way than using .BaseType several times?

Use the System.Type.IsSubclassOf method.

Best Regards,
Dustin Campbell
Developer Express Inc.
 
Joachim said:
How can you find out if a class is inherited from a certain other class? Is
there another way than using .BaseType several times?

Others have answered the question you asked.

But you are really looking for:

if(someobject is SomeClass)

Arne
 

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