1

im trying to develop an app. like vs ObjectBrowser and flow was something like this: stackoverflow.com/questions/6939400/create-a-application-like-visual-studio-object-browser

now my problem was i cant find the method for calling all basetypes ... something like: enter image description here

instead i can only see "Object" as BaseType for Class ...

Q: Is there a way I can get all basetypes via reflection?
4

1 回答 1

2

接口IComparableIStructuralComparable)不是基本类型,因为基本类型只能是一种Object在您的情况下)。如果要实现所有接口,请使用

  Type tp = ... // type of interest

  Type baseType = tp.BaseType; // Base type
  Type[] interfaces = tp.GetInterfaces(); // Interfaces
于 2015-01-27T14:17:20.207 回答