polymorphism real time example C#
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()
{
}
}