The <PropertyName> Property is Read-Only

Description

The code contains an expression that attempts to set the value of a read-only property.

Troubleshooting Tips

Modify the expression so it does not assign values to a read-only property.

Example

Class TestClass: Object
    Public Shared Property Test: Integer
        Get
        Begin
            Return 1
        End Get
    End Property Test;
End Class TestClass;

Sub Main;
Var
    Obj: TestClass;
Begin
    Obj.Test := 1;
End Sub Main;

When the specified code is compiled, the following error is displayed: The Test property is read-only. To resolve the error, add the Set specifier to the description of the Test property or remove the assignment from the expression.

See also:

Compiler Messages