using System;
namespace ConsoleApplication1
{
class BaseClass
{
public BaseClass()
{
Console.WriteLine("Base Class constructor is called");
}
∼ BaseClass()
{
Console.WriteLine("Destroying BaseClass");
}
}
class DerivedClass : BaseClass
{
public DerivedClass()
{
Console.WriteLine("Derived Class constructor is called");
}
∼ DerivedClass()
{
Console.WriteLine("Destroying DerivedClass");
}
}
class Program
{
static void Main(string[] args)
{
DerivedClass obj = new DerivedClass();
Console.WriteLine("Object Created ");
Console.ReadLine();
}
}
}