Created
December 11, 2017 14:08
-
-
Save nhoxbypass/a185028e68fd71848e249644d6b39067 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class Base | |
{ | |
public Base() | |
{ | |
Console.WriteLine("Base 0 constructor called"); | |
} | |
public Base(int i) | |
{ | |
Console.WriteLine("Base " + i + " constructor called"); | |
} | |
} | |
class Child : Base | |
{ | |
public Child() | |
{ | |
Console.WriteLine("Child constructor called"); | |
} | |
public Child(int i) | |
{ | |
Console.WriteLine("Child " + i + " constructor called"); | |
} | |
} | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Base c = new Child(1); | |
Console.ReadLine(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment