Getting Type information about a Class ?

  • Thread starter Thread starter vivekaseeja
  • Start date Start date
V

vivekaseeja

Hi,

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

Thanks in advance ..
 
<[email protected]> a écrit dans le message de (e-mail address removed)...

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

if (typeof(IMyInterface).IsAssignableFrom(typeof(MyClass)))
...

Joanna
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top