Polymorphism

Using one declared type to work with objects that provide different implementations.

What is Polymorphism in C#?

Polymorphism — Using one declared type to work with objects that provide different implementations.

class Alert
{
    public virtual string Text()
    {
        return "Alert";
    }
}

class EmailAlert : Alert
{
    public override string Text()
    {
        return "Email";
    }
}

Level: Journeyman · More C# terms at this level

Updated

In other subjects