New Keyword in Polymorphism
Hi
can any one tell me what is doing new Keyword i am not understanding
class BC
{
public void Display()
{
System.Console.WriteLine("BC::Display");
}
}
class DC : BC
{
new public void Display()
{
System.Console.WriteLine("DC::Display");
}
}
class TC : DC
{
new public void Display()
{
Console.WriteLine("TC::Display");
}
}
class Demo
{
public static void Main()
{
DC b;
b = new DC();
b.Display();
b = new TC();
b.Display();
//b = new TC();
//b.Display();
}
}