write to program in c# to demonstrate the use of Polymorphism code example
Example: polymorphism in c#
public class X
{
public virtual void A()
{
}
}
public class Y : X
{
public override void A()
{
}
}
public class X
{
public virtual void A()
{
}
}
public class Y : X
{
public override void A()
{
}
}