TFooClass class private function GetValue const AIndex Integer Integer

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
TFooClass = class
private
function GetValue(const AIndex: Integer): Integer;
procedure SetValue(const AIndex: Integer; AValue: Integer);
public
// note that the read and write methods are shared
property Value1: Integer index 1 read GetValue write SetValue;
property Value2: Integer index 2 read GetValue write SetValue;
property Value3: Integer index 3 read GetValue write SetValue;
property Value4: Integer index 4 read GetValue write SetValue;
// index may be a const or a number or you can even use an enumerated type
// for example:
// property Value: Integer index ord(seSomeEnum) read SomeFunction write SomeProcedure;
end;