Base Interfaces

An interface can inherit from zero or more interfaces, which are named parent interfaces for this interface. When an interface has one or more parent interfaces, they are specified in its declaration after the colon.

interface-base:

:   interface-type-list

Parent interfaces must be at least as accessible as the interface itself.

It is a compile error for an interface to directly or indirectly inherit from itself.

Base interfaces of a given interface are its parent interfaces and their base interfaces. In other words, the set of base interfaces is the complete transitive closure of the inheritance relationship. An interface inherits all members of its base interfaces.

A class or structure, implementing an interface also implicitly implement all its base interfaces.

Example

Interface IBaseInterface
    Sub Base();
End Interface;

Interface IUserInterface: IBaseInterface
    Function UserCaclulation(): boolean;
End Interface;

Class UserObject: IUserInterface
    b: boolean;
    
    Public Function UserCaclulation(): boolean;
    Begin
        //Function code
        Return b;
    End Function;
    
    Public Sub Base();
    Begin
        
    End Sub;
End Class;

See also:

Interfaces