Interface in C# Last Updated : 16 Sep, 2025 Suggest changes Share Like Article Like Report An interface in C# is defined using the interface keyword. It serves as a blueprint that declares methods, properties, events or indexers without implementation. A class or struct that implements the interface must provide the actual implementation, either implicitly or explicitly.There are some important points to remember, as mentioned below:Interfaces cannot have private members.By default, all the members of Interface are public and abstract.The interface will always be defined with the help of the keyword interface.Interfaces cannot contain fields because they represent an implementation of data.We can achieve multiple inheritance with the interface but not with the classes.We can implement multiple interfaces in a single class separated by commas.Example 1: Demonstrating the basic case for implementing the Interface. C# // Demonstrate working of Interface using System; interface inter1{ // method having only declaration with no definition void display(); } // Implementing inteface in Geeks class Geeks : inter1{ // providing the body part of function public void display(){ Console.WriteLine("Demonstration of interface"); } public static void Main(String[] args){ Geeks t = new Geeks(); t.display(); } } OutputDemonstration of interface Example 2: Implementation of interfaces and the use of polymorphism in C# C# using System; // interface declaration interface Vehicle{ // abstract method. void speedUp(int a); } // class implements interface class Bicycle : Vehicle{ int speed; // Method increase speed public void speedUp(int increment){ speed = speed + increment; } // Method check speed public void CheckSpeed(){ Console.WriteLine("speed: " + speed); } } // class implements interface class Bike : Vehicle{ int speed; // to increase speed public void speedUp(int increment){ speed = speed + increment; } public void CheckSpeed(){ Console.WriteLine("speed: " + speed); } } class Geeks { public static void Main(String[] args) { // creating an instance of Bicycle doing some operations Bicycle bicycle = new Bicycle(); bicycle.speedUp(3); Console.WriteLine("Bicycle present state :"); bicycle.CheckSpeed(); // creating instance of bike. Bike bike = new Bike(); bike.speedUp(4); Console.WriteLine("Bike present state :"); bike.CheckSpeed(); } } OutputBicycle present state : speed: 3 Bike present state : speed: 4 Advantages of InterfacesLoose coupling: It is used to achieve loose coupling rather than concrete implementations, we can decouple classes and reduce interdependencies.Abstraction: Interface helps to achieve full abstraction.Maintainability: It helps to achieve component-based programming that can make code more maintainable.Multiple Inheritance: Interface used to achieve multiple inheritance and abstraction.Define architecture: Interfaces add a plug and play like architecture into applications.Modularity: Promote a cleaner and more modular design. By separating the definition of behavior from the implementation M Mithun Kumar Follow Article Tags : Misc C# CSharp-Interfaces 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 C# | Method Parameters 7 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 C# ArrayList Class 7 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 4 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 4 min read C# Multidimensional Indexers 5 min read C# - Overloading of Indexers 3 min read My Profile ${profileImgHtml} My Profile Edit Profile My Courses Join Community Transactions Logout Like