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

Ask A Question

Stats

  • Questions 78k
  • Answers 78k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Aagh! These answers are very uninformed! Of course, it doesn't… May 11, 2026 at 3:43 pm
  • added an answer Anything that will be included in every JSP, feel free… May 11, 2026 at 3:43 pm
  • added an answer to change the object owner try the following EXEC sp_changedbowner… May 11, 2026 at 3:43 pm

Related Questions

For whatever reason, I have a lot of clients that have existing data that's
I have a question about best practices regarding how one should approach storing complex
Sorry if the question is confused, as I'm confused myself. I'm working around these
Our installer is written with Inno Setup and we are actually quite happy with

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.