I have a class with multiple variables, which can be accessed by their own property:
TGame = class(TObject)
strict private
FValue1 : Integer;
FValue2 : Integer;
private
procedure SetValue1(const Value : Integer);
procedure SetValue2(const Value : Integer);
function GetValue1() : Integer;
function GetValue2() : Integer;
public
property Value1 : Integer read GetValue1 write SetValue1;
property Value2 : Integer read GetValue2 write SetValue2;
I am wondering, if there is a way to use the same getter and setter for different properties, like this:
property Value1 : Integer read GetValue write SetValue;
property Value2 : Integer read GetValue write SetValue;