using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
namespace Rextester
{
public class GrandParent
{
public GrandParent()
{
Console.WriteLine("Grand Parent default ctor");
}
}
public class Parent : GrandParent
{
public Parent()
{
Console.WriteLine("Parent class default ctor");
}
public Parent(string param)
{
Console.WriteLine("Parent class parametric ctor");
}
}
public class Child :Parent
{
public Child ():base("Child1")
{
Console.WriteLine("Child class default ctor");
}
}
public class Program
{
public static void Main(string[] args)
{
Child childObj = new Child();
}
}
}
|