//在 type 區寫入:
TMyClass = class
property s: string;
end;
//然後把光標放在其中,執行 Ctrl+Shift+C,可以自動生成以下代碼:
TMyClass = class
private
Fs: string;
procedure Sets(const Value: string);
published
property s: string read Fs write Sets;
end;
{ TMyClass }
procedure TMyClass.Sets(const Value: string);
begin
Fs := Value;
end;