示例
Employee:
//virtual method
public virtual string GetHealthInsuranceAmount()
{
return "Health Insurance amount is: " + 500;
}
Manager:
//method overriding of virtual methods
public override string GetHealthInsuranceAmount()
{
System.Console.WriteLine(base.GetHealthInsuranceAmount());
return "Additional Health Insurance premium amount is: 1000";
}