Method Overriding
Providing a subclass version of an inherited instance method.
What is Method Overriding in C#?
Method Overriding — Providing a subclass version of an inherited instance method.
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