Specifies that a method or property overrides the same method or property inherited from a parent class.


Declaration contexts
You can use @Override only with Method and Property. These procedures must be open in the parent class or trait. Open procedures have one of the modifiers @Open or @Abstract.
Mixd modifiers
You cannot put @Override together with @Abstract and @Shared in the same declaration.
Equivalent signatures
A method or property with @Override must have a signature that is almost the same as the procedure it overrides:
  • The names must be the same.
  • The return types must be the same.
  • If the procedure is generic, then the number of generic parameters must be the same. And if the procedure has constraints (Where), then these must also be the same.
  • For Method, the parameters must be the same number, in the same sequence, with the same data types and modifiers, for example, ByRef.

Applies to


Basic example

@Open Class BaseClass
    @Open Method MyMethod()
    End Method
End Class

Class DerivedClass Is BaseClass
    @Override Method MyMethod()
    End Method
End Class

Override an abstract class

Require ViviFire.Math

@Abstract Class Shape
    Method Area() As Real
End Class

Class Circle Is Shape
    Constructor Var
        radius As Real
    End Constructor
    @Override Method Area() As Real
        Return Pi * radius ^ 2
    End Method
End Class