Skip to content

Instantly share code, notes, and snippets.

@nhoxbypass
Created December 11, 2017 14:08
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 nhoxbypass/a185028e68fd71848e249644d6b39067 to your computer and use it in GitHub Desktop.
Save nhoxbypass/a185028e68fd71848e249644d6b39067 to your computer and use it in GitHub Desktop.
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