Reserved Member Names

For each source member declaration that is a property or event, the implementation must reserve two method signatures based on the kind of the member declaration, its name, and its type. It is a compilation error for a program to declare a member, whose signature matches one of these reserved signatures.

The following signatures are reserved for a simple property P of a type T:

Function get_P: T;

Sub set_P(value: T);

The following signatures are reserved for an indexed property P with the type T and parameter list L:

Function get_P(L): T;

Sub set_P(L; value: T);

The following signatures are reserved for an event E with a delegate type T:

Sub add_E(handler: T);

Sub remove_E(handler: T);

Example

Delegate MyDelegat(i: integer);

Class ReservedId
    //Property, for which a function and procedure are reserved
    Property Test: integer
        Get
        Begin
            Return 1;
        End Get
        Set
        Begin
            
        End Set
    End Property;
    //Event, for which two procedures are reserved
    Event OnMyEvent: MyDelegat;
    
    //Members that cause compilation error when they are declared
    Function get_Test(): integer;
    Begin
        
    End Function;
    Sub set_Test(value: integer);
    Begin
        
    End Sub;
    Sub add_OnMyEvent(handler: MyDelegat);
    Begin
        
    End Sub;
    Sub remove_OnMyEvent(handler: MyDelegat);
    Begin
        
    End Sub;
End Class;

See also:

Classes | Properties | Events