Getting Type information about a Class ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • vivekaseeja@gmail.com

    Getting Type information about a Class ?

    Hi,

    Is there a way to know if a class inherits from a particular interface
    using Type information and reflection ?

    Thanks in advance ..

  • Joanna Carter [TeamB]

    #2
    Re: Getting Type information about a Class ?

    <vivekaseeja@gm ail.com> a écrit dans le message de news:
    1147211818.0422 15.95590@v46g20 00...legro ups.com...

    | Is there a way to know if a class inherits from a particular interface
    | using Type information and reflection ?

    if (typeof(IMyInte rface).IsAssign ableFrom(typeof (MyClass)))
    ...

    Joanna

    --
    Joanna Carter [TeamB]
    Consultant Software Engineer


    Comment

    Working...