C# | Inheritance in interfaces Last Updated : 11 Jul, 2025 Comments Improve Suggest changes 5 Likes Like Report C# allows the user to inherit one interface into another interface. When a class implements the inherited interface then it must provide the implementation of all the members that are defined within the interface inheritance chain.Important Points: If a class implements an interface, then it is necessary to implement all the method that defined by that interface including the base interface methods. Otherwise, the compiler throws an error.If both derived interface and base interface declares the same member then the base interface member name is hidden by the derived interface member name.Syntax:// declaring an interfaceaccess_modifier interface interface_name { // Your code}// inheriting the interfaceaccess_modifier interface interface_name : interface_name{ // Your code}Example 1: CSharp // C# program to illustrate the concept // of inheritance in interface using System; // declaring an interface public interface A { // method of interface void mymethod1(); void mymethod2(); } // The methods of interface A // is inherited into interface B public interface B : A { // method of interface B void mymethod3(); } // Below class is inheriting // only interface B // This class must // implement both interfaces class Geeks : B { // implementing the method // of interface A public void mymethod1() { Console.WriteLine("Implement method 1"); } // Implement the method // of interface A public void mymethod2() { Console.WriteLine("Implement method 2"); } // Implement the method // of interface B public void mymethod3() { Console.WriteLine("Implement method 3"); } } // Driver Class class GFG { // Main method static void Main(String []args) { // creating the object // class of Geeks Geeks obj = new Geeks(); // calling the method // using object 'obj' obj.mymethod1(); obj.mymethod2(); obj.mymethod3(); } } OutputImplement method 1 Implement method 2 Implement method 3Example 2: CSharp // C# program to illustrate the concept // of inheritance in the interface using System; // declaring an interface public interface Votes { // method of interface void vote_no(int a); } // The methods of interface Votes // is inherited into interface Details public interface Details : Votes { // method of interface Details void detailsofauthor(string n, int p); } // Below class is inheriting // the interface Details // This class must implement // the methods of both interface // i.e. Votes and Details class TechnicalScriptWriter : Details { // implementing the method // of interface Votes public void vote_no(int a) { Console.WriteLine("Total number of votes is: {0}", a); } // implementing the method // of interface Details public void detailsofauthor(string n, int p) { Console.WriteLine("Name of the author is: {0}", n); Console.WriteLine("Total number of published" + " article is: {0}", p); } } // Driver Class class GFG { // Main method static void Main() { // Creating the objects of // TechinalScriptWriter class TechnicalScriptWriter obj = new TechnicalScriptWriter(); // calling the methods by passing // the required values obj.vote_no(470045); obj.detailsofauthor("Siya", 98); } } OutputTotal number of votes is: 470045 Name of the author is: Siya Total number of published article is: 98 Create Quiz Comment A ankita_saini Follow 5 Improve A ankita_saini Follow 5 Improve Article Tags : C# CSharp-OOP Explore IntroductionC# Tutorial 2 min read Introduction to .NET Framework 6 min read C# .NET Framework (Basic Architecture and Component Stack) 6 min read C# Hello World 2 min read Common Language Runtime (CLR) in C# 4 min read FundamentalsC# Identifiers 2 min read Data Types in C# 6 min read C# Variables 4 min read C# Literals 5 min read Operators in C# 7 min read C# Keywords 5 min read Control StatementsC# Decision Making (if, if-else, if-else-if ladder, nested if, switch, nested switch) 5 min read C# Switch Statement 4 min read Loops in C# 4 min read C# Jump Statements (Break, Continue, Goto, Return and Throw) 4 min read OOP ConceptsClass and Objects in C# 4 min read Constructors in C# 5 min read C# Inheritance 3 min read Encapsulation in C# 2 min read C# Abstraction 4 min read MethodsMethods in C# 4 min read Method Overloading in C# 4 min read Method Parameters in C# 4 min read Method Overriding in C# 7 min read Anonymous Method in C# 2 min read ArraysArrays in C# 6 min read Jagged Arrays in C# 4 min read Array Class in C# 5 min read How to Sort an Array in C# | Array.Sort() Method Set - 1 8 min read How to find the rank of an array in C# 2 min read ArrayListArrayList in C# 6 min read ArrayList Class in C# 4 min read C# | Array vs ArrayList 2 min read StringStrings in C# 6 min read C# Verbatim String Literal - @ 5 min read C# String Class 9 min read C# StringBuilder 2 min read C# String vs StringBuilder 3 min read TupleC# Tuple 7 min read C# Tuple Class 3 min read C# ValueTuple 7 min read C# ValueTuple Struct 4 min read IndexersC# Indexers 5 min read C# Multidimensional Indexers 5 min read C# - Overloading of Indexers 3 min read Like