How to Create an Interface in C# ?

You might need to few functionalities without defining any implementation of the abstract methods. This should later be applied to various types within your project.

In this case , one can create an interface which specifies some behavior rather than what the type or member is all about.

How to Create an Interface in C# ?

Below is a sample interface called IMusic

public interface IAbundantcodeMusicPlayer
{
        void Play();
        void Next();
        void Previous();
        void Stop();

}

The interface in c# can contain functions and properties and by default they all are public.