Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3941496
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T00:33:00+00:00 2026-05-20T00:33:00+00:00

My purpose is to find out if a class implements an interface directly. In

  • 0

My purpose is to find out if a class implements an interface directly. In the example below, class B implements interface IB and interface IB implements IA.

How do I find out the inheritance hierarchy? When we view a type in Object Browser, it shows a detailed hierarchy. How can I achieve similar result?

interface IA
{
    string Member1 { get;set; }
}

interface IB : IA
{
    string Member2 { get; set; }
}

class B : IB
{
    public string Member1 { get; set; }
    public string Member2 { get; set; }
}

Reflector Screenshot

alt text http://img571.imageshack.us/img571/7485/49211426.png

In the screenshot taken from reflector it shows the hierarchy of the interfaces as well.

How can I find out the interface hierarchy for a Type.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T00:33:00+00:00Added an answer on May 20, 2026 at 12:33 am

    Reflection and the .NET core are built to make interfaces fast to use. Thus, Type.GetInterfaces returns all the interfaces that the type can respond to, “flattening” the interface hierarchy in the process.

    If you want to divine the ancestry of those interfaces, you will need to call GetInterfaces on each interface as well. There is no shortcut because the hierarchy of interfaces is of little value to the CLR runtime.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Below I'm debugging and throwing an exception on purpose to find out the value
I want to find out Sin⁻¹ values. For that purpose initially i am converting
I am unable to find out the bug in the below code which i
I'm trying to find out if two strings I have are the same, for
The basic_string class was apparently designed as a general purpose container, as I cannot
I am writing a special-purpose mini-compiler and I often view disassembled CIL to figure
I want to find out the best way of creating time based events in
I am experimenting with PHP OOP what i'm trying to find out is, Is
For purposes of my app I need to be able to find out a
I've created my own split view controller for the iPad. My main purpose in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.