[Mono-dev] embedding C, typeof operator

vavra at software602.cz vavra at software602.cz
Wed Mar 22 05:25:42 EST 2006

 I'd like in C to find out wheter some C# class has some type.
For example:
  class C is descendat of class B
  class B is descendat of class A
  I have instace ic of class C
  I'd to test wheter ic is type of A.

Is there other way than using  mono_class_get_parent?:

       MonoClass *parent=ic_klass;
       while (parent) {
               if (strcmp(mono_type_full_name(mono_class_get_type(parent)), "A") {
                   printf("ic is typeof A");
               parent =  mono_class_get_parent(parent);

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20060322/ff758119/attachment.html 

More information about the Mono-devel-list mailing list