property of as



property_of_as
Smart pascal source code
type TTest = class Field: Integer; property Prop: Integer read Field write Field; end; var o: TObject; o := TTest.Create; WriteLn((o as TTest).Field); WriteLn((o as TTest).Prop); (o as TTest).Field := 1; WriteLn((o as TTest).Field); WriteLn((o as TTest).Prop); (o as TTest).Prop := 2; WriteLn((o as TTest).Field); WriteLn((o as TTest).Prop); {<<< RESULT - CONSOLE LOG >>> ----------------------------- 0 0 1 1 2 2 ----------------------------- {<<<<<<<<< THE END >>>>>>>>>}