The New Modifier

It is permitted to declare a member in the class body with the same name or signature as an inherited member. When it occurs, the derived class member is said to hide the basic class member. Hiding an inherited member is not considered an error but it does cause the compiler to issue a warning. To suppress the warning, the declaration of the derived class member hiding the basic member must include the New modifier.

If the New modifier is included in a declaration that does not hide an inherited member, a warning is issued by the compiler. This warning is suppressed by removing the New modifier from the member declaration.

Example

Class A
    Public Sub Test();
    Begin
        
    End Sub;
    
    Public Function Test1(): integer;
    Begin
        Return 1
    End Function;
End Class;

Class B: A
    New Sub Test();
    Begin
        
    End Sub;
    
    New Function Test1(): integer;
    Begin
        Return 2
    End Function;
End Class;

See also:

Class Members