TX = class
privte
FI : integer;
FIsIAssigned : boolean;
procedure SetI(const Value : integer);
public
property I : integer read FI write SetI;
constructor Create;
end;
---------------
procedure TX.Create;
begin
FIsIAssigned := false;
end;
procedure TX.SetI(const Value : integer);
begin
FI := Value;
FIsIAssigned := true;
end;
在其他方法中通过FIsIAssigned的值来判断I是否已赋值