Skip to content

Instantly share code, notes, and snippets.

@lgolubyev
Created May 24, 2022 11:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lgolubyev/a53d09afb2d949de7f8eb4c192a6bc24 to your computer and use it in GitHub Desktop.
Save lgolubyev/a53d09afb2d949de7f8eb4c192a6bc24 to your computer and use it in GitHub Desktop.
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