Created
May 24, 2022 11:07
-
-
Save lgolubyev/a53d09afb2d949de7f8eb4c192a6bc24 to your computer and use it in GitHub Desktop.
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 class Parent | |
{ | |
public Parent() | |
{ | |
Console.WriteLine("Parent Ctor"); | |
Method(); | |
} | |
public virtual void Method() | |
{ | |
Console.WriteLine("Parent method"); | |
} | |
} | |
public class Child : Parent | |
{ | |
public Child() | |
{ | |
Console.WriteLine("Child Ctor"); | |
} | |
public override void Method() | |
{ | |
Console.WriteLine("Child method"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment