sumit Gupta

sumit Gupta

  • NA
  • 1
  • 1.7k

Question on Multilevel inheritance

May 27 2013 2:12 PM
Dear Friends,

I have one question and if any one knows about it then please answer

class Base
{
   public virtual void func()
{
  
}
}

class d1 
{}

class d2 : d1
{
   public override void func()
{}
}

class Program
{
   public static void main()
{
   d1 =d =new d2();
   d.func();
  
}
}

Will it work  ? 
Please answer..
Thanks in advance.

Answers (1)