471,594 Members | 1,725 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,594 software developers and data experts.

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

How can you find out if a class is inherited from a certain other class? Is
there another way than using .BaseType several times?
Nov 7 '06 #1
4 1127

"Joachim" <Jo*****@discussions.microsoft.comwrote in message
news:19**********************************@microsof t.com...
How can you find out if a class is inherited from a certain other class?
Is
there another way than using .BaseType several times?

Nov 7 '06 #2
type1.IsSubclassOf(type2);

Marc
Nov 7 '06 #3
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.
Nov 7 '06 #4
Joachim wrote:
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
Nov 8 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Scott Gunn | last post: by
9 posts views Thread by Henning Hasemann | last post: by
14 posts views Thread by lovecreatesbea... | last post: by
36 posts views Thread by Roedy Green | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.