# Virtual Method

A method that derived classes are allowed to override.

## What is **Virtual Method** in C#?

**Virtual Method** — A method that derived classes are allowed to override.

```csharp
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](https://www.ask-codey.com/glossary/subjects/c-sharp/journeyman)

Updated: September 27, 2026

## In other subjects

- [Virtual Method in OOP](https://www.ask-codey.com/glossary/virtual-method-oop)

Source: https://www.ask-codey.com/glossary/virtual-method
