Created
May 23, 2024 13:44
-
-
Save ChrisMoney/ba4b77acf81d521328857ecf93adb21e to your computer and use it in GitHub Desktop.
Virtual Method
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 virtual void MakeSound() | |
{ | |
Console.WriteLine("The animal makes a sound"); | |
} | |
public override void MakeSound() | |
{ | |
Console.WriteLine("The cat meows"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment