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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T17:44:46+00:00 2026-05-10T17:44:46+00:00

I have been asking myself this question for a long time now. Thought of

  • 0

I have been asking myself this question for a long time now. Thought of posting it. C# doesn’t support Multiple Inheritance(this is the fact). All classes created in C# derive out of ‘Object’ class(again a fact).

So if C# does not support Multiple inheritance, then how are we able to extend a class even though it already extends Object class?

Illustating with an example:

  1. class A : object – Class A created.
  2. class B : object – Class B created.
  3. class A : B – this again is supported. What happens to the earlier association to object.

We are able to use object class methods in A after step 3. So is the turned to multi level inheritance. If that is the case, then

  1. class A : B
  2. class C : B
  3. class A : C – I must be able to access class B’s methods in A. Which is not the case?

Can anyone please explain?

  • 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. 2026-05-10T17:44:47+00:00Added an answer on May 10, 2026 at 5:44 pm

    Joel’s answer is correct. There is a difference between multiple inheritance and an inhertance tree (or derivation chain). In your example, you actually show an inhertance tree: One object inherits (derives) from another object higher in the tree. Multiple inheritance allows one object to inherit from multiple base classes.

    Take, for example, the following tree:

    public class BaseClass { }  public class SpecialBaseClass : BaseClass {}  public class SpecialtyDerivedClass : SpecialBaseClass {} 

    This is perfectly valid and says that SpecialtyDerivedClass inherits from SpecialBaseClass (SpecialtyDerivedClass’ parent) which, in turn, derives from BaseClass (SpecialtyDerivedClass’ grandparent).

    Under the idea of multiple inheritance, the example would look like this:

    public class BaseClass { }  public class SpecialBaseClass {}  public class SpecialtyDerivedClass : BaseClass, SpecialBaseClass {} 

    This is not allowed in .NET, but it says that SpecialityDerivedClass inherits from both BaseClass and SpecialBaseClass (which are both parents).

    .NET does allow a form of multiple inheritance by allowing you to inherit from more than one interface. Changing the example above slightly:

    public class BaseClass { }  public interface ISpecialBase {}  public interface ISpecialDerived {}  public class SpecialtyDerivedClass : BaseClass, ISpecialBase, ISpecialDerived {} 

    This says that SpecialtyDerivedClass inherits from BaseClass (it’s parent) and also ISpecialBase and ISpecialDerived (also parent’s but more like step-parents as interfaces can’t specify functionality).

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

Sidebar

Related Questions

I have been asking this myself for a while. Debugging in visual studio goes
Why can't we use C++ for web development?. I have been asking this question
that is a question I have been asking myself for a while. Giving a
I know there have been a million questions asking this, but mine is different.
Have been working on this question for a couple hours and have come close
I fully understand this question has been asked a lot , but I'm asking
First of all this is the first time I am asking a java question
I have been using analytics software for a while, and I've been asking myself
I have been searching for an answer to this question for days and it
I have a feeling this is a dumb question I should have been able

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.