Get superType of type

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • msjonathan
    New Member
    • Dec 2009
    • 24

    Get superType of type

    Hej hej,

    I have some classes like this:
    Resource
    |
    Person
    / \
    Employee Visitor

    Somewhere in my program I do like this: entity.GetType( ) (entity is type of Employee).
    Right now I want to fetch the SuperType of Employee (Person).
    Is that possible?

    Greetz Jonathan
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    Will entity.GetType( ).BaseType work for you?
    (Note BaseType could be null I believe if it doesn't inherit from anything)

    Comment

    • msjonathan
      New Member
      • Dec 2009
      • 24

      #3
      Thanks

      Thank you very much ;)

      Comment

      Working...