In C#, inheritance is a mechanism where a derived class can reuse and extend the members of a base class. The main types of inheritance are:
Single Inheritance – One derived class inherits from one base class.
Multilevel Inheritance – A class inherits from another derived class, forming a chain such as Animal ? Dog ? Puppy.
Hierarchical Inheritance – Multiple derived classes inherit from the same base class, such as Dog and Cat inheriting from Animal.
Multiple Inheritance – C# does not support multiple inheritance through classes, meaning a class cannot inherit from two classes. However, a class can implement multiple interfaces.
Hybrid Inheritance – A combination of different inheritance types. C# doesn't support hybrid inheritance through multiple classes, but similar designs can be achieved using classes together with interfaces.
For example:
class Animal
{
public void Eat() { }
}
class Dog : Animal
{
public void Bark() { }
}
class Puppy : Dog
{
public void Play() { }
}
Here, Dog demonstrates single inheritance and Puppy demonstrates multilevel inheritance.
One important point is that C# supports multiple interface implementation but not multiple class inheritance, which helps avoid ambiguity and the "diamond problem."
C# supports five types of inheritance conceptually, though not all of them are supported directly through classes — some need interfaces to work around C#'s "no multiple class inheritance" rule.
1. Single Inheritance
One class inherits from exactly one base class. This is the simplest and most common form.
public class Beverage
{
public void Prepare() => Console.WriteLine("Preparing beverage");
}
public class Coffee : Beverage
{
public void Brew() => Console.WriteLine("Brewing coffee");
}
Coffee has access to everything in Beverage, plus its own members.
2. Multilevel Inheritance
A chain — a class inherits from a derived class, which itself inherited from another base class.
public class Beverage { public void Prepare() { } }
public class Coffee : Beverage { public void Brew() { } }
public class Latte : Coffee { public void AddMilk() { } }
Latte inherits from Coffee, which inherits from Beverage — so Latte gets members from both ancestors.
3. Hierarchical Inheritance
Multiple classes inherit from the same single base class.
public class Beverage { public void Prepare() { } }
public class Coffee : Beverage { }
public class Tea : Beverage { }
public class Juice : Beverage { }
Both Coffee and Tea share the common Beverage base but are unrelated to each other.
4. Multiple Inheritance (via Interfaces only)
C# does not allow a class to inherit from more than one class — this avoids the classic "diamond problem." But a class can implement multiple interfaces, which is how C# achieves multiple inheritance of behavior/contract.
public interface IPreparable { void Prepare(); }
public interface IServable { void Serve(); }
public class Coffee : IPreparable, IServable
{
public void Prepare() => Console.WriteLine("Preparing coffee");
public void Serve() => Console.WriteLine("Serving coffee");
}
5. Hybrid Inheritance
A combination of two or more of the above types — typically achieved in C# by mixing class inheritance with interfaces, since multiple class inheritance itself isn't available.
public class Beverage { public void Prepare() { } }
public interface IServable { void Serve(); }
public class Coffee : Beverage, IServable
{
public void Serve() => Console.WriteLine("Serving coffee");
}
Types of inheritance in C# Single, Multilevel, and Hierarchical inheritance directly through classes. Multiple and Hybrid inheritance are implemented using interfaces
Priya PrajapatiPosted Aug 16, 2026, 3:40 AM
Inheritance is used in C# to allow one class to reuse the properties and methods of another class.
Types of Inheritance :
Single Inheritance – A derived class inherits from one base class.
Multilevel Inheritance – A class inherits from another derived class, forming a chain of inheritance.
Hierarchical Inheritance – Multiple classes inherit from the same base class.
Multiple Inheritance – A class inherits from multiple base classes; C# does not support this with classes, but it can be achieved using interfaces.
Hybrid Inheritance – A combination of two or more inheritance types, typically implemented in C# using interfaces.
Cynthia SathuragiriPosted Aug 14, 2026, 5:32 AM
In C#, inheritance is a mechanism where a derived class can reuse and extend the members of a base class. The main types of inheritance are:
Single Inheritance – One derived class inherits from one base class.
Multilevel Inheritance – A class inherits from another derived class, forming a chain such as
Animal ? Dog ? Puppy.Hierarchical Inheritance – Multiple derived classes inherit from the same base class, such as
DogandCatinheriting fromAnimal.Multiple Inheritance – C# does not support multiple inheritance through classes, meaning a class cannot inherit from two classes. However, a class can implement multiple interfaces.
Hybrid Inheritance – A combination of different inheritance types. C# doesn't support hybrid inheritance through multiple classes, but similar designs can be achieved using classes together with interfaces.
For example:
Here,
Dogdemonstrates single inheritance andPuppydemonstrates multilevel inheritance.One important point is that C# supports multiple interface implementation but not multiple class inheritance, which helps avoid ambiguity and the "diamond problem."
Pankajkumar PatelPosted Aug 12, 2026, 5:56 AM
Hi Rajvardhan Shinde,
Using inheritance one class can acquire properties and methods of another class. C# supports following types of inheritance:
Single Inheritance
Multilevel Inheritance
Hierarchical Inheritance
Multiple Inheritance (Interfaces)
Note:
Hybrid Inheritance can be implemented via Interfaces
Multiple Inheritance (Classes) not supported in C#
Below is one of the best article with complete reference about C# Inheritance
C# Inheritance
Glad to help! Please mark this answer as the accepted answer if it helped you out!
Sudarshan HajarePosted Aug 11, 2026, 2:14 AM
Types of Inheritance in C#
C# supports five types of inheritance conceptually, though not all of them are supported directly through classes — some need interfaces to work around C#'s "no multiple class inheritance" rule.
1. Single Inheritance
One class inherits from exactly one base class. This is the simplest and most common form.
Coffeehas access to everything inBeverage, plus its own members.2. Multilevel Inheritance
A chain — a class inherits from a derived class, which itself inherited from another base class.
Latteinherits fromCoffee, which inherits fromBeverage— soLattegets members from both ancestors.3. Hierarchical Inheritance
Multiple classes inherit from the same single base class.
Both
CoffeeandTeashare the commonBeveragebase but are unrelated to each other.4. Multiple Inheritance (via Interfaces only)
C# does not allow a class to inherit from more than one class — this avoids the classic "diamond problem." But a class can implement multiple interfaces, which is how C# achieves multiple inheritance of behavior/contract.
5. Hybrid Inheritance
A combination of two or more of the above types — typically achieved in C# by mixing class inheritance with interfaces, since multiple class inheritance itself isn't available.
Sangeetha SPosted Aug 10, 2026, 12:05 PM
Types of inheritance in C# Single, Multilevel, and Hierarchical inheritance directly through classes. Multiple and Hybrid inheritance are implemented using interfaces