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 7957061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:11:16+00:00 2026-06-04T04:11:16+00:00

I have 2 interfaces and 2 classes that I investigate via Reflection: IParent IChild

  • 0

I have 2 interfaces and 2 classes that I investigate via Reflection:

  • IParent
  • IChild – derives from IParent
  • Parent
  • Child – derives from Parent

Strange thing for me is the fact that when I look through reflection on IChild type I don’t find IParent method.

Same code applied to Child type works as expected – reflection shows Parent method.

interface IParent
{
     void ParentMethod();
}

interface IChild : IParent
{
     void ChildMethod();
}

class Parent 
{
     public void ParentMethod(){}
}

class Child : Parent
{
     public void ChildMethod(){}
}

void Main()
{
    //investigate derived interface
     Type t = typeof(IChild);
     var info = t.GetMethod("ChildMethod");//ok
     Console.WriteLine(info); 
     info = t.GetMethod("ParentMethod");//returns null!
     Console.WriteLine(info); 
     //investigate derived class
     t = typeof(Child);
     info = t.GetMethod("ChildMethod");//ok
     Console.WriteLine(info);
     info = t.GetMethod("ParentMethod");//ok
     Console.WriteLine(info);
}

Please explain such behaviour?

Is there any workaround to reflect base interface’s methods from the derived interface’s 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-06-04T04:11:17+00:00Added an answer on June 4, 2026 at 4:11 am

    Although, we use the interfaces as the same way we use inheritance (“:”); interfaces are not inherited; they are to be implemented. In such a case; inheritance is confused with implementation since they are defined using the same operator (“:”).

    As a summary;
    IA : IB and A:IA means; any class implementing IA, shall implement IB. In this case; A shall implement IA and IB.

    A:B means A class inherits B class; it does not implement.

    The confusion here derives from using the same operator (“:”).

    Check this page interface inheritance

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

Sidebar

Related Questions

I have written a set of classes and interfaces that are implemented in Moose
I have a class that instantiates two classes which implement interfaces. I want one
I have an interface, and some classes that inherit from it. public interface IFoo
I have several classes that are basically interfaces to database rows. Since the class
Sometimes I wonder that we do have interfaces and abstract classes for two different
I have a bunch of objects that inherit abstracts interfaces generated from an idl
I have several interfaces and classes that I have in my business layer project
I have a collection of classes that inherit from an abstract class I created.
I have a hierarchy of three interfaces, grandparent, parent and child. Parent and child
Hi I have classes that extend some given interfaces which I can't change. And

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.