check if a class is inherited from another class
-
Is there a possibility (net 2.0) to check if a class is inherited from another class? I have no instances of the 2 classes only types. e.g. class A:class B { } class B:class C{ } class a inherits from class B? -> yes.... Regards Hansjörg Edit/Delete Message
-
Is there a possibility (net 2.0) to check if a class is inherited from another class? I have no instances of the 2 classes only types. e.g. class A:class B { } class B:class C{ } class a inherits from class B? -> yes.... Regards Hansjörg Edit/Delete Message
Have you tried: A aObj = new A(); if(aObj is B) //do something
-
Have you tried: A aObj = new A(); if(aObj is B) //do something
is not possible because I don't have always the default constructor.... regards Hansjörg
-
Is there a possibility (net 2.0) to check if a class is inherited from another class? I have no instances of the 2 classes only types. e.g. class A:class B { } class B:class C{ } class a inherits from class B? -> yes.... Regards Hansjörg Edit/Delete Message
-
thanks this works