There is a TPerson class. FSecondName is known to be unique to each object.
type TPerson = class(TObject) private FAge: Integer; FFirstName: String; FSecondName: String; public property Age: Integer read FAge; property FirstName: String read FFirstName; property SecondName: String read FSecondName; constructor Create; end;
How to add a class field (for example, a static field in C #) Persons: TDictionary (String, TPerson), where the key is SecondName and the value is an object of the TPerson class.
Thanks!
source share