The block code reads the value of a write-only property.
Modify the property so that it would be available for reading. Change the code that reads write-only properties.
Class MyClass: Object
i: Integer;
Public Property Test: Integer
Set
Begin
i := Value;
End Set
End Property Test;
End Class MyClass;
Sub UserProc;
Var
Obj: MyClass;
i: Integer;
Begin
Obj := New MyClass.Create;
i := Obj.Test;
End Sub UserProc;
When the specified code is compiled, the string i := Obj.Test; displays the following error: Invalid use of the Test write-only property of the MyClass class. To resolve the error, add the Get specifier to the property description or change the string, in which the error is generated.
See also: