C# Interface

tutorial and example
tutorial and example

Interface can be defined as a blueprint of the class. It can only have abstract methods. It has to be implemented by a class or struct. It is mainly used to achieve full abstraction because it can’t have normal methods. In C#, multiple inheritance is achieved by interface.

Interface can’t be instantiated. If a class is implementing an interface then it must give definition to all of its methods.

Let’s see an example of interface in C#.

Output