Created
April 28, 2021 19:44
-
-
Save manoj-choudhari-git/48aa8b5ed81330c0dbf21b8ca75462fb to your computer and use it in GitHub Desktop.
Sample interface and its implementation for default method implementation in interfaces demo C# 8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface IPlayMusic | |
{ | |
void Play(); | |
void Stop(); | |
} | |
public class SomeMusicPlayer: IPlayMusic | |
{ | |
public void Play() | |
{ | |
} | |
public void Stop() | |
{ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment